Commit 97cb82c1 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Wizards: Add a method to query available features



Change-Id: I4dc03acbd2fdc040c2a49ed8923d1615489d8288
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@theqtcompany.com>
parent 7c1b21f6
......@@ -255,12 +255,7 @@ QString IWizardFactory::runPath(const QString &defaultPath)
bool IWizardFactory::isAvailable(const QString &platformName) const
{
FeatureSet availableFeatures = pluginFeatures();
foreach (const IFeatureProvider *featureManager, s_providerList)
availableFeatures |= featureManager->availableFeatures(platformName);
return availableFeatures.contains(requiredFeatures());
return availableFeatures(platformName).contains(requiredFeatures());
}
QStringList IWizardFactory::supportedPlatforms() const
......@@ -338,6 +333,16 @@ FeatureSet IWizardFactory::pluginFeatures() const
return plugins;
}
FeatureSet IWizardFactory::availableFeatures(const QString &platformName) const
{
FeatureSet availableFeatures = pluginFeatures();
foreach (const IFeatureProvider *featureManager, s_providerList)
availableFeatures |= featureManager->availableFeatures(platformName);
return availableFeatures;
}
void IWizardFactory::initialize()
{
connect(ICore::instance(), &ICore::coreAboutToClose, &IWizardFactory::clearWizardFactories);
......
......@@ -107,6 +107,7 @@ public:
protected:
FeatureSet pluginFeatures() const;
FeatureSet availableFeatures(const QString &platformName) const;
private:
static void initialize();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment