From b86842b22706e23d7319aa373d8c6c4b19a3688f Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Tue, 27 Apr 2021 14:43:31 +0200 Subject: QQuickApplicationHelper: error-check after createWithInitialProperties Unlike create(), it does produce errors that will not always be noticeable if we don't check for them. Change-Id: Ia3adad6937de5f9b923e0e1593486b8ae11c3c68 Reviewed-by: Fabian Kosmale --- tests/auto/shared/visualtestutil.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/shared/visualtestutil.h') diff --git a/tests/auto/shared/visualtestutil.h b/tests/auto/shared/visualtestutil.h index 122dd415..215a487b 100644 --- a/tests/auto/shared/visualtestutil.h +++ b/tests/auto/shared/visualtestutil.h @@ -142,7 +142,7 @@ namespace QQuickVisualTestUtil component.loadUrl(testCase->testFileUrl(testFilePath)); QObject *rootObject = component.createWithInitialProperties(initialProperties); cleanup.reset(rootObject); - if (!rootObject) { + if (component.isError() || !rootObject) { errorMessage = QString::fromUtf8("Failed to create window: %1").arg(component.errorString()).toUtf8(); return; } -- cgit v1.2.3