Commit faa3a32d authored by Kai Koehne's avatar Kai Koehne
Browse files

TargetSetupPage: Do not show targets that do not have required features

Change-Id: I8107f1de0120f46dd428ad257f0a38ab6ebb4abc
Reviewed-on: http://codereview.qt.nokia.com/694

Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent e4351cd3
......@@ -102,6 +102,11 @@ void TargetSetupPage::setPreferredFeatures(const QSet<QString> &featureIds)
m_preferredFeatures = featureIds;
}
void TargetSetupPage::setRequiredFeatures(const QSet<QString> &featureIds)
{
m_requiredFeatures = featureIds;
}
void TargetSetupPage::setMinimumQtVersion(const QtSupport::QtVersionNumber &number)
{
m_minimumQtVersionNumber = number;
......@@ -119,6 +124,9 @@ void TargetSetupPage::setupWidgets()
foreach (Qt4BaseTargetFactory *factory, factories) {
QStringList ids = factory->supportedTargetIds(0);
foreach (const QString &id, ids) {
if (!factory->targetFeatures(id).contains(m_requiredFeatures))
continue;
QList<BuildConfigurationInfo> infos = BuildConfigurationInfo::filterBuildConfigurationInfos(m_importInfos, id);
Qt4TargetSetupWidget *widget =
factory->createTargetSetupWidget(id, m_proFilePath, m_minimumQtVersionNumber, m_importSearch, infos);
......
......@@ -75,6 +75,9 @@ public:
/// Changes the default set of checked targets.
/// call this before \sa initializePage()
void setPreferredFeatures(const QSet<QString> &featureIds);
/// Sets the features a target must support
/// call this before \sa initializePage()
void setRequiredFeatures(const QSet<QString> &featureIds);
/// Sets the minimum qt version
/// calls this before \sa initializePage()
void setMinimumQtVersion(const QtSupport::QtVersionNumber &number);
......@@ -96,6 +99,7 @@ private:
void deleteWidgets();
QSet<QString> m_preferredFeatures;
QSet<QString> m_requiredFeatures;
bool m_importSearch;
QtSupport::QtVersionNumber m_minimumQtVersionNumber;
QString m_proFilePath;
......
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