aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2014-04-16 10:01:25 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2014-04-23 08:41:43 +0200
commit95ed35296e811d5ed2583e9ec84f1c26ce021a39 (patch)
tree7f62694a7f59e7c64ad6922886edb217bdf7f5bf
parent50eb187c035000dd7c1e0614b1abac65abf34b99 (diff)
fix XcodeProbe::compareVersions
Task-number: QBS-556 Change-Id: I1f38394a8b60aae3185901176dce9439d6ad111a Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
-rw-r--r--src/app/qbs-setup-toolchains/xcodeprobe.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/app/qbs-setup-toolchains/xcodeprobe.cpp b/src/app/qbs-setup-toolchains/xcodeprobe.cpp
index 362a45e77..38df7ff72 100644
--- a/src/app/qbs-setup-toolchains/xcodeprobe.cpp
+++ b/src/app/qbs-setup-toolchains/xcodeprobe.cpp
@@ -83,7 +83,7 @@ int XcodeProbe::compareVersions(const QString &v1, const QString &v2)
QStringList v1L = v1.split(QLatin1Char('.'));
QStringList v2L = v2.split(QLatin1Char('.'));
int i = 0;
- while (v1.length() > i && v1.length() > i) {
+ while (v1L.length() > i && v2L.length() > i) {
bool n1Ok, n2Ok;
int n1 = v1L.value(i).toInt(&n1Ok);
int n2 = v2L.value(i).toInt(&n2Ok);
@@ -97,9 +97,9 @@ int XcodeProbe::compareVersions(const QString &v1, const QString &v2)
return 1;
++i;
}
- if (v1.length() > v2.length())
+ if (v1L.length() > v2L.length())
return -1;
- if (v1.length() < v2.length())
+ if (v1L.length() < v2L.length())
return 1;
return 0;
}