diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2022-05-30 14:15:49 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-06-10 20:41:13 +0000 |
commit | 31e27e27fbcc828c6843ce4af81cd8a2cf60c83d (patch) | |
tree | 7b9675521d375e80b6c6850c1ec1fb75d6d73ac4 | |
parent | 617ed3f78fb77d8904cc45a6db4ec7e221060007 (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.
Change-Id: I6ed5df864b78c689f3c572875115e4eea14748ca
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 1aae77c94da1e5d8e7b1ee6593fee04f710fe4f3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | tests/auto/qml/qqmlqt/tst_qqmlqt.cpp | 1 |
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 89457f50a4..9315a78260 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); |