aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2018-12-20 18:58:10 +0100
committerUlf Hermann <ulf.hermann@qt.io>2019-01-21 08:40:33 +0000
commit0b863bca305ad43b3c48287ec4e62e262c8e8849 (patch)
treedb0e7a1f2ae4aed7ee7cc66351ecc04d719cbff7 /tests/auto/qml/qqmllanguage
parent9d0ce63d3297bbc1ecfb29b26ffafa80d6a28fb0 (diff)
QML: Special case null as binding type
This gives us the opportunity to map the JavaScript null to QVariant's concept of isNull(). [ChangeLog][QML] Assigning JavaScript null to incompatibly typed properties generates a compile error now, rather than a runtime error. Fixes: QTBUG-72098 Change-Id: I72fd1c30d84128c774230eaaea10455b2a0e064c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage')
-rw-r--r--tests/auto/qml/qqmllanguage/data/objectDeletionNotify.1.qml2
-rw-r--r--tests/auto/qml/qqmllanguage/data/objectDeletionNotify.2.qml2
-rw-r--r--tests/auto/qml/qqmllanguage/data/objectDeletionNotify.3.qml2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.1.qml b/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.1.qml
index acd5463a3c..ac5622f9fb 100644
--- a/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.1.qml
+++ b/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.1.qml
@@ -10,7 +10,7 @@ Item {
}
}
- property bool expectNull: null
+ property bool expectNull: { return null; }
function setExpectNull(b) {
success = false;
diff --git a/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.2.qml b/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.2.qml
index ed0e0d10f0..3c18739c32 100644
--- a/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.2.qml
+++ b/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.2.qml
@@ -10,7 +10,7 @@ Item {
}
}
- property bool expectNull: null
+ property bool expectNull: { return null; }
function setExpectNull(b) {
success = false;
diff --git a/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.3.qml b/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.3.qml
index f5e94ba715..e2e560199f 100644
--- a/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.3.qml
+++ b/tests/auto/qml/qqmllanguage/data/objectDeletionNotify.3.qml
@@ -10,7 +10,7 @@ Item {
}
}
- property bool expectNull: null
+ property bool expectNull: { return null; }
function setExpectNull(b) {
success = false;