From 31e27e27fbcc828c6843ce4af81cd8a2cf60c83d Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 30 May 2022 14:15:49 +0200 Subject: 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 (cherry picked from commit 1aae77c94da1e5d8e7b1ee6593fee04f710fe4f3) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/qml/qqmlqt/tst_qqmlqt.cpp | 1 + 1 file changed, 1 insertion(+) 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 obj(component.create()); + QVERIFY2(obj != nullptr, qPrintable(component.errorString())); QCOMPARE(obj->property("qdate").toDate(), date); QCOMPARE(obj->property("qtime").toTime(), time); -- cgit v1.2.3