forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -88,15 +88,18 @@ Core::GeneratedFiles FormClassWizard::generateFiles(const QWizard *w, QString *e
|
||||
|
||||
Core::GeneratedFile headerFile(headerFileName);
|
||||
headerFile.setEditorId(QLatin1String(CppEditor::Constants::CPPEDITOR_ID));
|
||||
headerFile.setAttributes(Core::GeneratedFile::OpenEditorAttribute);
|
||||
|
||||
// Source
|
||||
Core::GeneratedFile sourceFile(sourceFileName);
|
||||
sourceFile.setEditorId(QLatin1String(CppEditor::Constants::CPPEDITOR_ID));
|
||||
sourceFile.setAttributes(Core::GeneratedFile::OpenEditorAttribute);
|
||||
|
||||
// UI
|
||||
Core::GeneratedFile uiFile(formFileName);
|
||||
uiFile.setContents(params.uiTemplate());
|
||||
uiFile.setEditorId(QLatin1String(Constants::DESIGNER_XML_EDITOR_ID));
|
||||
uiFile.setAttributes(Core::GeneratedFile::OpenEditorAttribute);
|
||||
|
||||
QString source, header;
|
||||
Designer::FormClassWizardGenerationParameters generationParameters;
|
||||
|
||||
Reference in New Issue
Block a user