diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2021-04-27 14:56:35 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-04-27 15:06:17 +0000 |
commit | 2574c0cba6a243b90c161b4e91c91cfa15502e98 (patch) | |
tree | fcbf76d7f2c4f31f0e722ef26ff70fc6f3d3f591 /tests | |
parent | 5e6028e88b74dea1f46a4807da898ad83584b3d5 (diff) |
QQmlComponentPrivate::setInitialProperty: improve error message
We can discern between the case where the property does not exist at
all, and the case where we cannot set it.
Change-Id: Ia2e8f4cc077a00b90d720db01bff1542a812dea0
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 7275328b967582010abfd59c9a93feef4cb1379f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp index c4a1a6aea4..c6c6a20724 100644 --- a/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp +++ b/tests/auto/qml/qqmlcomponent/tst_qqmlcomponent.cpp @@ -829,7 +829,7 @@ void tst_qqmlcomponent::testSetInitialProperties() comp.createWithInitialProperties(QVariantMap { {"notThePropertiesYoureLookingFor", 42} }) }; QVERIFY(obj); - QVERIFY(comp.errorString().contains("Could not set property notThePropertiesYoureLookingFor")); + QVERIFY(comp.errorString().contains("Setting initial properties failed: Item does not have a property called notThePropertiesYoureLookingFor")); } } |