aboutsummaryrefslogtreecommitdiffstats
path: root/share/qbs/modules/qbs
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-11-04 14:50:52 +0100
committerChristian Kandeler <christian.kandeler@digia.com>2013-11-04 14:54:59 +0100
commit5634743a0d06d8c355fa7c95285c74d2649f182e (patch)
treed7f930be0f50e6d767db7d6a1265364c0315fd3f /share/qbs/modules/qbs
parent1ab65090c921a33b25e43609b43fc0553bd1fcef (diff)
fix hostOSVersion for other platforms than Windows or OS X
Change-Id: I84ee85506d24ebeb9e801f684495f9200cb759f6 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'share/qbs/modules/qbs')
-rw-r--r--share/qbs/modules/qbs/common.qbs18
1 files changed, 10 insertions, 8 deletions
diff --git a/share/qbs/modules/qbs/common.qbs b/share/qbs/modules/qbs/common.qbs
index ee2fd49c9..73f2c5add 100644
--- a/share/qbs/modules/qbs/common.qbs
+++ b/share/qbs/modules/qbs/common.qbs
@@ -65,15 +65,17 @@ Module {
"You must use the canonical name '" + canonicalArch + "'";
}
- if ((hostOS.contains("windows") || hostOS.contains("osx")) && !hostOSVersion) {
- throw "Could not detect host operating system version; " +
- "verify that system files or registry have not been " +
- "tampered with.";
- }
+ if (hostOS.contains("windows") || hostOS.contains("osx")) {
+ if (!hostOSVersion) {
+ throw "Could not detect host operating system version; " +
+ "verify that system files or registry have not been " +
+ "tampered with.";
+ }
- if (!/^[0-9]+(\.[0-9]+){1,3}$/.test(hostOSVersion)) {
- throw "qbs.hostOSVersion is in an invalid format; it must be of the form x.y or " +
- "x.y.z or x.y.z.w where x, y, z and w are positive integers.";
+ if (!/^[0-9]+(\.[0-9]+){1,3}$/.test(hostOSVersion)) {
+ throw "qbs.hostOSVersion is in an invalid format; it must be of the form x.y or " +
+ "x.y.z or x.y.z.w where x, y, z and w are positive integers.";
+ }
}
}
}