QtKitInformation: Report correct version Id

We try hard to find the correct version, but then forget to report
that back before continuing to find a weaker match.

Change-Id: I824194fe4d13db04eba488268165b27c033d33bf
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2014-11-20 15:41:55 +01:00
parent 4fefe0c202
commit 682dd3d5ce

View File

@@ -77,13 +77,14 @@ QVariant QtKitInformation::defaultValue(ProjectExplorer::Kit *k) const
result = findOrDefault(versionList, [qmakePath](const BaseQtVersion *v) {
return v->qmakeCommand() == qmakePath;
});
if (result)
return result->uniqueId();
}
// Use *any* desktop Qt:
result = findOrDefault(versionList, [](const BaseQtVersion *v) {
return v->type() == QLatin1String(QtSupport::Constants::DESKTOPQT);
});
return result ? result->uniqueId() : -1;
}