summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-04-16 15:55:32 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2010-04-16 15:55:38 +0200
commit0a643a1994d54248246e2f74f1952449a0754d72 (patch)
tree14f0d04ea07dccdf2d9e858486a478e109b705dc /src/plugins/qt4projectmanager/wizards/librarywizard.cpp
parent854309267d153ed52e6866e8e4a6e91676c8a8ce (diff)
downloadqt-creator-0a643a1994d54248246e2f74f1952449a0754d72.tar.gz
Wizards: Open a relevant file in editor after the wizard run
Remove all hacks/conventions of considering the last generated file as project file, etc. and instead add attributes flags to Core::GeneratedFile, giving fine-grained control of what to do with the file. Implement static utility functions in wizards that handle it. Add boolean XML-attributes "openeditor"/"openproject" to the file elements used by the CustomWizard XML-specification. Manually set the attributes in all wizards. Task-number: QTCREATORBUG-1166
Diffstat (limited to 'src/plugins/qt4projectmanager/wizards/librarywizard.cpp')
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizard.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
index 343457fc41..65e115c1e1 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizard.cpp
@@ -88,6 +88,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
// Class header + source
const QString sourceFileName = buildFileName(projectPath, params.sourceFileName, sourceSuffix());
Core::GeneratedFile source(sourceFileName);
+ source.setAttributes(Core::GeneratedFile::OpenEditorAttribute);
const QString headerFileFullName = buildFileName(projectPath, params.headerFileName, headerSuffix());
const QString headerFileName = QFileInfo(headerFileFullName).fileName();
@@ -116,6 +117,7 @@ Core::GeneratedFiles LibraryWizard::generateFiles(const QWizard *w,
// Create files: profile
const QString profileName = buildFileName(projectPath, projectParams.fileName, profileSuffix());
Core::GeneratedFile profile(profileName);
+ profile.setAttributes(Core::GeneratedFile::OpenProjectAttribute);
QString profileContents;
{
QTextStream proStr(&profileContents);