forked from qt-creator/qt-creator
Added few new functions to IVersionControl, VCSManager and GeneratedFile to support the funcationality needed by the trac plugin.
All the version control plugins updated to have implementations according to the interface changes. Merge-request: 2178 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com> Merge-request: 2178 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
committed by
Tobias Hunger
parent
32fff3f6cd
commit
65e95c3aba
@@ -69,12 +69,14 @@ public:
|
||||
QString editorId;
|
||||
bool binary;
|
||||
GeneratedFile::Attributes attributes;
|
||||
bool writeAccess;
|
||||
};
|
||||
|
||||
GeneratedFilePrivate::GeneratedFilePrivate(const QString &p) :
|
||||
path(p),
|
||||
binary(false),
|
||||
attributes(0)
|
||||
attributes(0),
|
||||
writeAccess(true)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -104,6 +106,11 @@ GeneratedFile::~GeneratedFile()
|
||||
{
|
||||
}
|
||||
|
||||
void GeneratedFile::writeAccess(bool access)
|
||||
{
|
||||
m_d->writeAccess = access;
|
||||
}
|
||||
|
||||
QString GeneratedFile::path() const
|
||||
{
|
||||
return m_d->path;
|
||||
@@ -156,6 +163,9 @@ void GeneratedFile::setEditorId(const QString &k)
|
||||
|
||||
bool GeneratedFile::write(QString *errorMessage) const
|
||||
{
|
||||
if (!m_d->writeAccess)
|
||||
return true;
|
||||
|
||||
// Ensure the directory
|
||||
const QFileInfo info(m_d->path);
|
||||
const QDir dir = info.absoluteDir();
|
||||
|
||||
Reference in New Issue
Block a user