diff options
Diffstat (limited to 'tests/auto/qml/qqmllanguage')
6 files changed, 15 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/assignComponentToWrongType.errors.txt b/tests/auto/qml/qqmllanguage/data/assignComponentToWrongType.errors.txt new file mode 100644 index 0000000000..af103cf8bf --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignComponentToWrongType.errors.txt @@ -0,0 +1 @@ +4:27:Cannot assign object of type "Component" to property of type "QQmlTimer*" as the former is neither the same as the latter nor a sub-class of it. diff --git a/tests/auto/qml/qqmllanguage/data/assignComponentToWrongType.qml b/tests/auto/qml/qqmllanguage/data/assignComponentToWrongType.qml new file mode 100644 index 0000000000..2159bf8116 --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/assignComponentToWrongType.qml @@ -0,0 +1,9 @@ +import QtQml 2.9 + +QtObject { + property Timer stuff: Component { + QtObject { + objectName: "wrong" + } + } +} 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; diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 89856d6603..764a67a295 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -611,6 +611,8 @@ void tst_qqmllanguage::errors_data() QTest::newRow("badCompositeRegistration.1") << "badCompositeRegistration.1.qml" << "badCompositeRegistration.1.errors.txt" << false; QTest::newRow("badCompositeRegistration.2") << "badCompositeRegistration.2.qml" << "badCompositeRegistration.2.errors.txt" << false; + + QTest::newRow("assignComponentToWrongType") << "assignComponentToWrongType.qml" << "assignComponentToWrongType.errors.txt" << false; } |