diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2022-11-02 23:37:16 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2022-11-03 10:53:50 +0000 |
commit | 7b9303007a9f2aa9f31485f9802dd8a6aa2668ae (patch) | |
tree | 177e246c413ee2ddbfc63e8377245d8d2c18a044 | |
parent | 73cdb6239dd25305603e2ce4628f354e998398e3 (diff) |
QmlDesigner: Avoid error messages when adding effect
* Removing the summary page
* Adding DoNotOpenFile option
By default, the wizard expects to open a file.
Setting DoNotOpenFile to true does suppress this.
Task-number: QDS-8151
Change-Id: I62264733788dbbe1b017beaa428356548a1a3692
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
-rw-r--r-- | share/qtcreator/qmldesigner/studio_templates/files/effect/wizard.json | 10 | ||||
-rw-r--r-- | src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/share/qtcreator/qmldesigner/studio_templates/files/effect/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/effect/wizard.json index 3837321b1a..d922fb94a5 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/effect/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/effect/wizard.json @@ -11,7 +11,10 @@ "enabled": "%{JS: value('Features').indexOf('QmlDesigner.Wizards.Enterprise') >= 0}", "featuresRequired": [ "QmlDesigner.Wizards.Enterprise" ], - "options": { "key": "DefaultSuffix", "value": "qep" }, + "options": [ + { "key": "DefaultSuffix", "value": "qep" }, + { "key": "DoNotOpenFile", "value": "true" } + ], "pages" : [ @@ -19,11 +22,6 @@ "trDisplayName": "Location", "trShortTitle": "Location", "typeId": "File" - }, - { - "trDisplayName": "Project Management", - "trShortTitle": "Summary", - "typeId": "Summary" } ], "generators" : diff --git a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp index 4992660213..99d85b904e 100644 --- a/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp +++ b/src/plugins/projectexplorer/jsonwizard/jsonwizard.cpp @@ -442,7 +442,7 @@ QString JsonWizard::evaluate(const QVariant &v) const void JsonWizard::openFiles(const JsonWizard::GeneratorFiles &files) { QString errorMessage; - bool openedSomething = false; + bool openedSomething = stringValue("DoNotOpenFile") == "true"; for (const JsonWizard::GeneratorFile &f : files) { const Core::GeneratedFile &file = f.file; if (!QFileInfo::exists(file.path())) { |