From dcb0dd861bec6eb61b6bca6dad9399f59a5a1c2c Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 7 Apr 2017 15:25:39 +0200 Subject: Another attempt to fix tst_snippets on OS X 10.10 The test is sharing (and showing, and resizing) the same view for every snippet. In the CI system we keep having issues that sometimes, after running the test for a while, the window content stops being resized as appropriate. Considering that QQuickWindow resizes its content item in resizeEvent(), this probably means that in the CI the window does sometimes not receive the resize event as appropriate. Before, the window was left hanging there after taking the very first screenshot. Now we try to close the window so that each and every screenshot snippet gets loaded while the window is hidden, shows it, and waits for it to become visible/active. This will hopefully ensure that the window will always receive an "initial" resize event. Task-number: QTBUG-58606 Change-Id: If4b38443cfdc9175f313bf8e70c7daf42d34f687 Reviewed-by: Mitch Curtis --- tests/auto/snippets/tst_snippets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/snippets/tst_snippets.cpp b/tests/auto/snippets/tst_snippets.cpp index cca85b0c..ab3a94bc 100644 --- a/tests/auto/snippets/tst_snippets.cpp +++ b/tests/auto/snippets/tst_snippets.cpp @@ -147,7 +147,7 @@ void tst_Snippets::screenshots() QVERIFY(spy.wait()); QVERIFY(result->saveToFile(output)); - QGuiApplication::processEvents(); + view.close(); } void tst_Snippets::screenshots_data() -- cgit v1.2.3