forked from qt-creator/qt-creator
ProjectExplorer: declare only relevant aspects as features
This will disable python kits for all Wizards that require a valid Qt. Change-Id: I4a8d6dd60629ddb556e49c067200acba8ef080d2 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -725,8 +725,10 @@ QSet<Id> Kit::supportedPlatforms() const
|
||||
QSet<Id> Kit::availableFeatures() const
|
||||
{
|
||||
QSet<Id> features;
|
||||
for (const KitAspectFactory *factory : KitManager::kitAspectFactories())
|
||||
features |= factory->availableFeatures(this);
|
||||
for (const KitAspectFactory *factory : KitManager::kitAspectFactories()) {
|
||||
if (relevantAspects().isEmpty() || relevantAspects().contains(factory->id()))
|
||||
features |= factory->availableFeatures(this);
|
||||
}
|
||||
return features;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
|
||||
QSet<Id> availableFeatures(const Kit *k) const override
|
||||
{
|
||||
if (k->isAspectRelevant(PythonKitAspect::id()) && PythonKitAspect::python(k))
|
||||
if (PythonKitAspect::python(k))
|
||||
return {PythonKitAspect::id()};
|
||||
return {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user