diff --git a/share/qtcreator/qmldesigner/studio_templates/files/custombutton/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/custombutton/wizard.json index 9588f8ae396..82fbd0554d6 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/custombutton/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/custombutton/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Custom Button", "trDisplayCategory": "Qt Quick Controls", "icon": "custom_button.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/customcheckbox/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/customcheckbox/wizard.json index 5caa2fc5734..5749b32f169 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/customcheckbox/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/customcheckbox/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Custom CheckBox", "trDisplayCategory": "Qt Quick Controls", "icon": "custom_checkbox.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/customdial/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/customdial/wizard.json index d6b155cd44e..2543d3a0e48 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/customdial/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/customdial/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Custom Dial", "trDisplayCategory": "Qt Quick Controls", "icon": "custom_dial.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/customslider/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/customslider/wizard.json index 811124cf6b9..4873488915f 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/customslider/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/customslider/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Custom Slider", "trDisplayCategory": "Qt Quick Controls", "icon": "custom_slider.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/customspinbox/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/customspinbox/wizard.json index edc45531a5f..a0deae07f4d 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/customspinbox/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/customspinbox/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Custom SpinBox", "trDisplayCategory": "Qt Quick Controls", "icon": "custom_spinbox.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/customswitch/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/customswitch/wizard.json index 54552de2380..ff9bea6e0c7 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/customswitch/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/customswitch/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Custom Switch", "trDisplayCategory": "Qt Quick Controls", "icon": "custom_switch.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/flowitem/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/flowitem/wizard.json index 33c71ed19d5..6eadcc98294 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/flowitem/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/flowitem/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Flow Item", "trDisplayCategory": "Qt Quick Files", "icon": "flow_item.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/flowview/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/flowview/wizard.json index e0f61a85632..3a44d600aef 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/flowview/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/flowview/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Flow View", "trDisplayCategory": "Qt Quick Files", "icon": "flow_view.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/javascript/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/javascript/wizard.json index 94967ca6d4c..fb11c65b344 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/javascript/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/javascript/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Java Script File", "trDisplayCategory": "Java Script", "icon": "file_javascript.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, diff --git a/share/qtcreator/qmldesigner/studio_templates/files/listmodel/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/listmodel/wizard.json index 26c2cb5eac0..985e690a3e7 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/listmodel/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/listmodel/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "ListModel", "trDisplayCategory": "QML Files", "icon": "data_listmodel.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/pane/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/pane/wizard.json index 131ba799618..ea858ad6f36 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/pane/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/pane/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Pane", "trDisplayCategory": "Qt Quick Controls", "icon": "custom_panes.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/qtquickfile/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/qtquickfile/wizard.json index 15d46e25a65..480a728a36e 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/qtquickfile/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/qtquickfile/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Qt Quick File", "trDisplayCategory": "Qt Quick Files", "icon": "file_qml.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/qtquickviews/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/qtquickviews/wizard.json index 463e10ed4a6..5ac91b2dd13 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/qtquickviews/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/qtquickviews/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Qt Quick Views", "trDisplayCategory": "Qt Quick Files", "icon": "data_gridmodel.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/qtuiquickfile/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/qtuiquickfile/wizard.json index ff4d0291438..a70c2008932 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/qtuiquickfile/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/qtuiquickfile/wizard.json @@ -7,7 +7,6 @@ "trDisplayName": "Qt Quick UI File", "trDisplayCategory": "Qt Quick Files", "icon": "file_ui.png", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/files/stackedlayout/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/stackedlayout/wizard.json index 941056067ac..c9e7d3f9f27 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/stackedlayout/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/stackedlayout/wizard.json @@ -6,7 +6,6 @@ "trDescription": "Creates a UI file (.ui.qml) with a Stacked Layout as the root component.", "trDisplayName": "Stacked Layout", "trDisplayCategory": "Qt Quick Controls", - "featuresRequired": [ "QtStudio" ], "icon": "custom_stacked_view.png", "platformIndependent": true, diff --git a/share/qtcreator/qmldesigner/studio_templates/files/swipeview/wizard.json b/share/qtcreator/qmldesigner/studio_templates/files/swipeview/wizard.json index c10aebefe19..280d50af0f1 100644 --- a/share/qtcreator/qmldesigner/studio_templates/files/swipeview/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/files/swipeview/wizard.json @@ -6,7 +6,6 @@ "trDescription": "Creates a UI file (.ui.qml) with a Swipe View as the root component.", "trDisplayName": "Swipe View", "trDisplayCategory": "Qt Quick Controls", - "featuresRequired": [ "QtStudio" ], "icon": "custom_swipe_view.png", "platformIndependent": true, diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json index dbbf7331195..c35f10da210 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-3d/wizard.json @@ -9,7 +9,6 @@ "icon": "desktop_blank.png", "fontIconName": "wizardsGeneric", "enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json index a6288939eac..45965fad3db 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application-mcu/wizard.json @@ -9,7 +9,6 @@ "icon": "desktop_blank.png", "fontIconName": "wizardsMcuEmpty", "enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json index db5c4128bed..accd83efdf4 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/application/wizard.json @@ -9,7 +9,6 @@ "icon": "desktop_blank.png", "fontIconName": "wizardsGeneric", "enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json index 5b157ec2c57..bdf4873fa09 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/desktop-launcher/wizard.json @@ -9,7 +9,6 @@ "icon": "desktop_launcher.png", "fontIconName": "wizardsDesktop", "enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json index 318dbdac5e1..6009869a8df 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-scroll/wizard.json @@ -9,7 +9,6 @@ "icon": "mobile_scroll.png", "fontIconName": "wizardsMobile", "enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json index 986c8cbdb8c..53c389177f0 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-stack/wizard.json @@ -9,7 +9,6 @@ "icon": "mobile_stack.png", "fontIconName": "wizardsMobile", "enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json index 3773a615f50..065d2783427 100644 --- a/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json +++ b/share/qtcreator/qmldesigner/studio_templates/projects/mobile-swipe/wizard.json @@ -9,7 +9,6 @@ "icon": "mobile_swipe.png", "fontIconName": "wizardsMobile", "enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}", - "featuresRequired": [ "QtStudio" ], "platformIndependent": true, "options": diff --git a/src/plugins/studiowelcome/wizardfactories.cpp b/src/plugins/studiowelcome/wizardfactories.cpp index dfd21918e88..d374a5258c8 100644 --- a/src/plugins/studiowelcome/wizardfactories.cpp +++ b/src/plugins/studiowelcome/wizardfactories.cpp @@ -70,8 +70,7 @@ void WizardFactories::filter() { QList acceptedFactories = Utils::filtered(m_factories, [&](auto *wizard) { return wizard->isAvailable(m_platform) - && wizard->kind() == JsonWizardFactory::ProjectWizard - && wizard->requiredFeatures().contains("QtStudio"); + && wizard->kind() == JsonWizardFactory::ProjectWizard; }); m_factories = acceptedFactories; diff --git a/tests/auto/qml/qmldesigner/wizard/wizardfactories-test.cpp b/tests/auto/qml/qmldesigner/wizard/wizardfactories-test.cpp index 7a34b1d4205..30c79e9090d 100644 --- a/tests/auto/qml/qmldesigner/wizard/wizardfactories-test.cpp +++ b/tests/auto/qml/qmldesigner/wizard/wizardfactories-test.cpp @@ -49,7 +49,7 @@ public: ), (override)); - MOCK_METHOD((std::pair), screenSizeInfoFromPage, (const QString &), (const)); + MOCK_METHOD((std::pair), screenSizeInfoFromPage, (const QString &), (const, override)); MOCK_METHOD(bool, isAvailable, (Utils::Id), (const, override)); }; @@ -69,13 +69,13 @@ protected: WizardFactories::setIconUnicodeCallback(oldIconUnicodeFunc); } - IWizardFactory *aWizardFactory(IWizardFactory::WizardKind kind, bool requiresQtStudio = true, + IWizardFactory *aWizardFactory(IWizardFactory::WizardKind kind, const QPair &availableOnPlatform = {}) { MockWizardFactory *factory = new MockWizardFactory; m_factories.push_back(std::unique_ptr(factory)); - configureFactory(*factory, kind, requiresQtStudio, availableOnPlatform); + configureFactory(*factory, kind, availableOnPlatform); return factory; } @@ -88,7 +88,7 @@ protected: MockWizardFactory *factory = new MockWizardFactory; m_factories.push_back(std::unique_ptr(factory)); - configureFactory(*factory, IWizardFactory::ProjectWizard, /*req QtStudio*/true, + configureFactory(*factory, IWizardFactory::ProjectWizard, {platform, true}, sizes); if (!name.isEmpty()) @@ -102,7 +102,6 @@ protected: } void configureFactory(MockWizardFactory &factory, IWizardFactory::WizardKind kind, - bool requiresQtStudio = true, const QPair &availableOnPlatform = {}, const std::pair &sizes = {}) { @@ -117,14 +116,6 @@ protected: << "Expected to create a File Wizard factory"; } - if (requiresQtStudio) { - QSet features{"QtStudio"}; - factory.setRequiredFeatures(features); - } else { - QSet features{"some", "other", "features"}; - factory.setRequiredFeatures(features); - } - if (!availableOnPlatform.first.isEmpty()) { const QString platform = availableOnPlatform.first; bool value = availableOnPlatform.second; @@ -195,7 +186,7 @@ TEST_F(QdsWizardFactories, haveEmptyListOfWizardFactories) TEST_F(QdsWizardFactories, filtersOutNonProjectWizardFactories) { WizardFactories wf = makeWizardFactoriesHandler( - {aWizardFactory(IWizardFactory::FileWizard, /*req QtStudio*/ true, {platform, true})}, + {aWizardFactory(IWizardFactory::FileWizard, {platform, true})}, /*get wizards supporting platform*/ platform ); @@ -207,7 +198,7 @@ TEST_F(QdsWizardFactories, filtersOutNonProjectWizardFactories) TEST_F(QdsWizardFactories, filtersOutWizardFactoriesUnavailableForPlatform) { WizardFactories wf = makeWizardFactoriesHandler( - {aWizardFactory(IWizardFactory::ProjectWizard, /*req QtStudio*/ true, {"Non-Desktop", false})}, + {aWizardFactory(IWizardFactory::ProjectWizard, {"Non-Desktop", false})}, /*get wizards supporting platform*/ "Non-Desktop" ); @@ -216,19 +207,6 @@ TEST_F(QdsWizardFactories, filtersOutWizardFactoriesUnavailableForPlatform) ASSERT_THAT(presets, IsEmpty()); } -TEST_F(QdsWizardFactories, filtersOutWizardFactoriesThatDontRequireQtStudio) -{ - WizardFactories wf = makeWizardFactoriesHandler( - { - aWizardFactory(IWizardFactory::FileWizard, /*require QtStudio*/ false, {platform, true}) - }, - /*get wizards supporting platform*/ platform); - - std::map presets = wf.presetsGroupedByCategory(); - - ASSERT_THAT(presets, IsEmpty()); -} - TEST_F(QdsWizardFactories, doesNotFilterOutAGoodWizardFactory) { WizardFactories wf = makeWizardFactoriesHandler({aGoodWizardFactory()}, platform);