Commit 7c1b21f6 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

KitManager: Report all features on empty platform



The platform is empty when "all templates" is selected in the
NewDialog. In that case I expect all possible features to be
reported.

Change-Id: I2ad4ba6df217b39ffa44b7001875e46c04712bb5
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent f09a87e5
......@@ -89,7 +89,7 @@ public:
QModelIndex sourceIndex = sourceModel()->index(sourceRow, 0, sourceParent);
Core::IWizardFactory *wizard = factoryOfItem(qobject_cast<QStandardItemModel*>(sourceModel())->itemFromIndex(sourceIndex));
if (wizard)
return m_platform.isEmpty() || wizard->isAvailable(m_platform);
return wizard->isAvailable(m_platform);
return true;
}
......
......@@ -325,7 +325,7 @@ FeatureSet KitManager::availableFeatures(const QString &platform)
FeatureSet features;
foreach (const Kit *k, kits()) {
QSet<QString> kitPlatforms = k->availablePlatforms();
if (kitPlatforms.isEmpty() || kitPlatforms.contains(platform))
if (kitPlatforms.isEmpty() || kitPlatforms.contains(platform) || platform.isEmpty())
features |= k->availableFeatures();
}
return features;
......
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