QtVersionManager: Introduce qtVersionNumber + various fixes

Make the internal data structure a map from id to Version, simplfing a few
functions. Return sorted lists, with newer versions in front for various
functions, e.g. validVersions(), versionsForTargetId.
This commit is contained in:
dt
2011-02-21 12:16:20 +01:00
parent ac0cf764fd
commit a9963b6313
7 changed files with 154 additions and 104 deletions

View File

@@ -332,24 +332,13 @@ bool QMakeStep::isQmlDebuggingLibrarySupported(QString *reason) const
if (qt4BuildConfiguration()->qtVersion()->hasQmlDebuggingLibrary())
return true;
int major, minor, patch;
if (!qt4BuildConfiguration()->qtVersion()->versionNumbers(&major, &minor, &patch)) {
if (!qt4BuildConfiguration()->qtVersion()->isValid()) {
if (reason)
*reason = tr("Invalid Qt version.");
return false;
}
// only support 4.7.1 onwards
bool compatibleQt = false;
if (major == 4) {
if (minor == 7) {
if (patch >= 1)
compatibleQt = true;
} else if (minor > 7)
compatibleQt = true;
}
if (!compatibleQt) {
if (qt4BuildConfiguration()->qtVersion()->qtVersion() < QtVersionNumber(4, 7 ,0)) {
if (reason)
*reason = tr("Requires Qt 4.7.1 or newer.");
return false;