forked from qt-creator/qt-creator
qds: remove redundant "QtStudio" feature
Nowadays, the decision which wizards will be shown are done throw the StudioWelcome plugin if it is initialized or not. Change-Id: Ief95fa8f813408522ac43c31dd6f4ffb069338d0 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Thomas Hartmann
parent
b82bb52183
commit
f9cceb6267
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Custom Button",
|
||||
"trDisplayCategory": "Qt Quick Controls",
|
||||
"icon": "custom_button.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Custom CheckBox",
|
||||
"trDisplayCategory": "Qt Quick Controls",
|
||||
"icon": "custom_checkbox.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Custom Dial",
|
||||
"trDisplayCategory": "Qt Quick Controls",
|
||||
"icon": "custom_dial.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Custom Slider",
|
||||
"trDisplayCategory": "Qt Quick Controls",
|
||||
"icon": "custom_slider.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Custom SpinBox",
|
||||
"trDisplayCategory": "Qt Quick Controls",
|
||||
"icon": "custom_spinbox.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Custom Switch",
|
||||
"trDisplayCategory": "Qt Quick Controls",
|
||||
"icon": "custom_switch.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Flow Item",
|
||||
"trDisplayCategory": "Qt Quick Files",
|
||||
"icon": "flow_item.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Flow View",
|
||||
"trDisplayCategory": "Qt Quick Files",
|
||||
"icon": "flow_view.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Java Script File",
|
||||
"trDisplayCategory": "Java Script",
|
||||
"icon": "file_javascript.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "ListModel",
|
||||
"trDisplayCategory": "QML Files",
|
||||
"icon": "data_listmodel.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Pane",
|
||||
"trDisplayCategory": "Qt Quick Controls",
|
||||
"icon": "custom_panes.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Qt Quick File",
|
||||
"trDisplayCategory": "Qt Quick Files",
|
||||
"icon": "file_qml.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Qt Quick Views",
|
||||
"trDisplayCategory": "Qt Quick Files",
|
||||
"icon": "data_gridmodel.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"trDisplayName": "Qt Quick UI File",
|
||||
"trDisplayCategory": "Qt Quick Files",
|
||||
"icon": "file_ui.png",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -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,
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"icon": "desktop_blank.png",
|
||||
"fontIconName": "wizardsGeneric",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"icon": "desktop_blank.png",
|
||||
"fontIconName": "wizardsMcuEmpty",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"icon": "desktop_blank.png",
|
||||
"fontIconName": "wizardsGeneric",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"icon": "desktop_launcher.png",
|
||||
"fontIconName": "wizardsDesktop",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"icon": "mobile_scroll.png",
|
||||
"fontIconName": "wizardsMobile",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"icon": "mobile_stack.png",
|
||||
"fontIconName": "wizardsMobile",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
"icon": "mobile_swipe.png",
|
||||
"fontIconName": "wizardsMobile",
|
||||
"enabled": "%{JS: [ %{Plugins} ].indexOf('QmlProjectManager') >= 0}",
|
||||
"featuresRequired": [ "QtStudio" ],
|
||||
"platformIndependent": true,
|
||||
|
||||
"options":
|
||||
|
||||
@@ -70,8 +70,7 @@ void WizardFactories::filter()
|
||||
{
|
||||
QList<JsonWizardFactory *> 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;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
),
|
||||
(override));
|
||||
|
||||
MOCK_METHOD((std::pair<int, QStringList>), screenSizeInfoFromPage, (const QString &), (const));
|
||||
MOCK_METHOD((std::pair<int, QStringList>), 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<QString, bool> &availableOnPlatform = {})
|
||||
{
|
||||
MockWizardFactory *factory = new MockWizardFactory;
|
||||
m_factories.push_back(std::unique_ptr<IWizardFactory>(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<IWizardFactory>(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<QString, bool> &availableOnPlatform = {},
|
||||
const std::pair<int, QStringList> &sizes = {})
|
||||
{
|
||||
@@ -117,14 +116,6 @@ protected:
|
||||
<< "Expected to create a File Wizard factory";
|
||||
}
|
||||
|
||||
if (requiresQtStudio) {
|
||||
QSet<Utils::Id> features{"QtStudio"};
|
||||
factory.setRequiredFeatures(features);
|
||||
} else {
|
||||
QSet<Utils::Id> 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<QString, WizardCategory> presets = wf.presetsGroupedByCategory();
|
||||
|
||||
ASSERT_THAT(presets, IsEmpty());
|
||||
}
|
||||
|
||||
TEST_F(QdsWizardFactories, doesNotFilterOutAGoodWizardFactory)
|
||||
{
|
||||
WizardFactories wf = makeWizardFactoriesHandler({aGoodWizardFactory()}, platform);
|
||||
|
||||
Reference in New Issue
Block a user