forked from qt-creator/qt-creator
BaseQtVersion: Allow for a predicate when retrieving Qt versions
Make methods used to retrieve Qt versions from the Qt versions manager take a predicate to select the interesting version. Change-Id: I9218c57bae6d5033d49d618dfc0da41fe578444d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -74,15 +74,9 @@ bool AndroidPotentialKit::isEnabled() const
|
||||
}
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
foreach (QtSupport::BaseQtVersion *version, QtSupport::QtVersionManager::validVersions()) {
|
||||
if (version->type() == QLatin1String(Constants::ANDROIDQT)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
return QtSupport::QtVersionManager::version([](const QtSupport::BaseQtVersion *v) {
|
||||
return v->isValid() && v->type() == QString::fromLatin1(Constants::ANDROIDQT);
|
||||
});
|
||||
}
|
||||
|
||||
AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
|
||||
|
||||
Reference in New Issue
Block a user