aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlqt
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-05-30 14:15:49 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2022-06-10 17:19:59 +0200
commit1aae77c94da1e5d8e7b1ee6593fee04f710fe4f3 (patch)
tree43b6e4e046600125e7df3ee01253b4ac2a1a8604 /tests/auto/qml/qqmlqt
parent1e457e8cd38b8f9f07057827494e3687a2a9ad40 (diff)
Fix missing null-check after component.create() call
MinGW got a crash in tst_qqmlqt::dateTimeConversion(), due to the test neglecting to verify that component.create() had succeeeded, when various plugins were missing. Pick-to: 6.4 Change-Id: I6ed5df864b78c689f3c572875115e4eea14748ca Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlqt')
-rw-r--r--tests/auto/qml/qqmlqt/tst_qqmlqt.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
index e0ad9bcd57..6ccbecd55a 100644
--- a/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
+++ b/tests/auto/qml/qqmlqt/tst_qqmlqt.cpp
@@ -783,6 +783,7 @@ void tst_qqmlqt::dateTimeConversion()
QQmlEngine eng;
QQmlComponent component(&eng, testFileUrl("dateTimeConversion.qml"));
QScopedPointer<QObject> obj(component.create());
+ QVERIFY2(obj != nullptr, qPrintable(component.errorString()));
QCOMPARE(obj->property("qdate").toDate(), date);
QCOMPARE(obj->property("qtime").toTime(), time);