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:
@@ -1446,17 +1446,12 @@ void QmakeProject::collectLibraryData(const QmakeProFileNode *node, DeploymentDa
|
||||
|
||||
bool QmakeProject::matchesKit(const Kit *kit)
|
||||
{
|
||||
QList<QtSupport::BaseQtVersion *> parentQts;
|
||||
FileName filePath = projectFilePath();
|
||||
foreach (QtSupport::BaseQtVersion *version, QtSupport::QtVersionManager::validVersions()) {
|
||||
if (version->isSubProject(filePath))
|
||||
parentQts.append(version);
|
||||
}
|
||||
|
||||
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit);
|
||||
if (!parentQts.isEmpty())
|
||||
return parentQts.contains(version);
|
||||
return false;
|
||||
|
||||
return QtSupport::QtVersionManager::version([&filePath, version](const QtSupport::BaseQtVersion *v) {
|
||||
return v->isValid() && v->isSubProject(filePath) && v == version;
|
||||
});
|
||||
}
|
||||
|
||||
static Utils::FileName getFullPathOf(const QmakeProFileNode *pro, QmakeVariable variable,
|
||||
|
||||
Reference in New Issue
Block a user