diff options
author | Amanda Hamblin-Trué <amanda.hamblin-true@qt.io> | 2023-06-29 10:54:15 +0200 |
---|---|---|
committer | Amanda Hamblin-Trué <amanda.hamblin-true@qt.io> | 2023-07-05 10:34:12 +0000 |
commit | 514fa7e28403b8ff5e0e95084d318fe11698db2b (patch) | |
tree | d24521f5703ed0717e2654cf2e4be96bb9918389 /tests/auto/qml/qqmllanguage | |
parent | 1e5252f82e2c4e0c7922a21f5442ffbd534d2a15 (diff) |
Remove redundant warning
We already have a generic warning for assigning null to properties
that don't support it, so we warn twice.
Removed redundant warning so that we only warn once.
This partially reverts commit 16aff415a44f5f10c5ac95da72559839305c8ae5.
[ChangeLog][QtQml][Important Behavior Changes] Assigning null to
a property of incompatible type is now an error instead of a warning.
Fixes: QTBUG-102980
Change-Id: I739913ab64628376727b751512717eb4bf7ea5f4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage')
4 files changed, 3 insertions, 4 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; diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 93eddb4363..16d20e154e 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -4489,7 +4489,6 @@ void tst_qqmllanguage::groupAssignmentFailure() { auto ep = std::make_unique<QQmlEngine>(); QTest::failOnWarning("QQmlComponent: Component destroyed while completion pending"); - QTest::ignoreMessage(QtMsgType::QtWarningMsg, QRegularExpression(".*Invalid property assignment: url expected - Assigning null to incompatible properties in QML is deprecated. This will become a compile error in future versions of Qt..*")); QQmlComponent component(ep.get(), testFileUrl("groupFailure.qml")); QScopedPointer<QObject> o(component.create()); QVERIFY(!o); |