aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/blackbox/testdata/prevent-floating-point-values
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2018-04-23 14:40:58 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2018-04-24 07:41:17 +0000
commit501bb599bfcfa7b98227f7fc295cd8e0a09bc927 (patch)
tree6bda5fc4eb7e44f58d118bb9397ac3e6ae4e321c /tests/auto/blackbox/testdata/prevent-floating-point-values
parent3653385af94ae7fe042d1c4845293b495bdc9854 (diff)
Command line parser: Don't accidentally create floating-point values
This could easily happen; e.g. a property assignment such as "version: 10.10" would result in the version property getting the value "10.1". While users could work around that, the behavior was rather surprising. We claim that no floating-point values are ever assigned to properties and force such values to get parsed as strings. Task-number: QBS-1242 Change-Id: I0e21cefaed11de1553cb3ed085280adfb489a1a7 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/blackbox/testdata/prevent-floating-point-values')
-rw-r--r--tests/auto/blackbox/testdata/prevent-floating-point-values/prevent-floating-point-values.qbs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/blackbox/testdata/prevent-floating-point-values/prevent-floating-point-values.qbs b/tests/auto/blackbox/testdata/prevent-floating-point-values/prevent-floating-point-values.qbs
new file mode 100644
index 000000000..619e44f20
--- /dev/null
+++ b/tests/auto/blackbox/testdata/prevent-floating-point-values/prevent-floating-point-values.qbs
@@ -0,0 +1,6 @@
+import qbs
+
+Product {
+ name: "p"
+ property bool dummy: { console.info("version: " + version); }
+}