forked from qt-creator/qt-creator
Custom Wizards: No files generated.
Fix breakage introduced by 65e95c3aba,
introducing a writeAccess attribute not properly initialized
in the default CT. The GeneratedFile::CustomGeneratorAttribute
exists for that purpose.
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
Task-number: QTCREATORBUG-2518
This commit is contained in:
@@ -69,14 +69,12 @@ public:
|
||||
QString editorId;
|
||||
bool binary;
|
||||
GeneratedFile::Attributes attributes;
|
||||
bool writeAccess;
|
||||
};
|
||||
|
||||
GeneratedFilePrivate::GeneratedFilePrivate(const QString &p) :
|
||||
path(p),
|
||||
binary(false),
|
||||
attributes(0),
|
||||
writeAccess(true)
|
||||
attributes(0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -106,11 +104,6 @@ GeneratedFile::~GeneratedFile()
|
||||
{
|
||||
}
|
||||
|
||||
void GeneratedFile::setWriteAccess(bool access)
|
||||
{
|
||||
m_d->writeAccess = access;
|
||||
}
|
||||
|
||||
QString GeneratedFile::path() const
|
||||
{
|
||||
return m_d->path;
|
||||
@@ -163,9 +156,6 @@ 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();
|
||||
|
||||
@@ -101,7 +101,6 @@ public:
|
||||
void setEditorId(const QString &k);
|
||||
|
||||
bool write(QString *errorMessage) const;
|
||||
void setWriteAccess(bool access = true);
|
||||
|
||||
Attributes attributes() const;
|
||||
void setAttributes(Attributes a);
|
||||
|
||||
Reference in New Issue
Block a user