diff options
-rw-r--r-- | tests/auto/quick/drawingmodes/tst_drawingmodes.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp b/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp index fe794cf952..afc66948b0 100644 --- a/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp +++ b/tests/auto/quick/drawingmodes/tst_drawingmodes.cpp @@ -51,8 +51,8 @@ public: view.setResizeMode(QQuickView::SizeViewToRootObject); view.setSource(testFileUrl(fileName)); view.setVisible(true); - QTest::qWaitForWindowExposed(&view); - return view.grabWindow(); + bool exposed = QTest::qWaitForWindowExposed(&view); + return exposed ? view.grabWindow() : QImage(); } //It is important for platforms that only are able to show fullscreen windows |