summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/kitmanager.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-11-27 12:07:56 +0100
committerTobias Hunger <tobias.hunger@theqtcompany.com>2015-12-02 14:49:20 +0000
commiteebe44d3cfb62b94840b4845017bffb58ec601ae (patch)
treef1be8f0e8d15784e16eb70414aaee2e292fd2ea7 /src/plugins/projectexplorer/kitmanager.cpp
parent4b0a8648e4e1a2001367442525b4d57f92b61bd8 (diff)
downloadqt-creator-eebe44d3cfb62b94840b4845017bffb58ec601ae.tar.gz
Wizards: Turn "platform" into an Id
It used to be a string constant. Change-Id: Ibea34dc52e97a483989e6d628b908231f4e2dc54 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Diffstat (limited to 'src/plugins/projectexplorer/kitmanager.cpp')
-rw-r--r--src/plugins/projectexplorer/kitmanager.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/plugins/projectexplorer/kitmanager.cpp b/src/plugins/projectexplorer/kitmanager.cpp
index 3101ca09a6..900dc1955a 100644
--- a/src/plugins/projectexplorer/kitmanager.cpp
+++ b/src/plugins/projectexplorer/kitmanager.cpp
@@ -302,15 +302,15 @@ void KitManager::deregisterKitInformation(KitInformation *ki)
delete ki;
}
-QSet<QString> KitManager::availablePlatforms()
+QSet<Id> KitManager::availablePlatforms()
{
- QSet<QString> platforms;
+ QSet<Id> platforms;
foreach (const Kit *k, kits())
platforms.unite(k->availablePlatforms());
return platforms;
}
-QString KitManager::displayNameForPlatform(const QString &platform)
+QString KitManager::displayNameForPlatform(Id platform)
{
foreach (const Kit *k, kits()) {
const QString displayName = k->displayNameForPlatform(platform);
@@ -320,13 +320,13 @@ QString KitManager::displayNameForPlatform(const QString &platform)
return QString();
}
-QSet<Id> KitManager::availableFeatures(const QString &platform)
+QSet<Id> KitManager::availableFeatures(Id platform)
{
QSet<Id> features;
foreach (const Kit *k, kits()) {
- QSet<QString> kitPlatforms = k->availablePlatforms();
- if (kitPlatforms.isEmpty() || kitPlatforms.contains(platform) || platform.isEmpty())
- features |= k->availableFeatures();
+ QSet<Id> kitPlatforms = k->availablePlatforms();
+ if (kitPlatforms.isEmpty() || kitPlatforms.contains(platform) || !platform.isValid())
+ features.unite(k->availableFeatures());
}
return features;
}
@@ -553,13 +553,13 @@ QString KitInformation::displayNamePostfix(const Kit *k) const
return QString();
}
-QSet<QString> KitInformation::availablePlatforms(const Kit *k) const
+QSet<Id> KitInformation::availablePlatforms(const Kit *k) const
{
Q_UNUSED(k);
- return QSet<QString>();
+ return QSet<Id>();
}
-QString KitInformation::displayNameForPlatform(const Kit *k, const QString &platform) const
+QString KitInformation::displayNameForPlatform(const Kit *k, Id platform) const
{
Q_UNUSED(k);
Q_UNUSED(platform);
@@ -588,19 +588,19 @@ void KitInformation::notifyAboutUpdate(Kit *k)
// KitFeatureProvider:
// --------------------------------------------------------------------
-QSet<Id> KitFeatureProvider::availableFeatures(const QString &platform) const
+QSet<Id> KitFeatureProvider::availableFeatures(Id id) const
{
- return KitManager::availableFeatures(platform);
+ return KitManager::availableFeatures(id);
}
-QStringList KitFeatureProvider::availablePlatforms() const
+QSet<Id> KitFeatureProvider::availablePlatforms() const
{
- return KitManager::availablePlatforms().toList();
+ return KitManager::availablePlatforms();
}
-QString KitFeatureProvider::displayNameForPlatform(const QString &string) const
+QString KitFeatureProvider::displayNameForPlatform(Id id) const
{
- return KitManager::displayNameForPlatform(string);
+ return KitManager::displayNameForPlatform(id);
}
} // namespace ProjectExplorer