Skip flaky FileDialog modality test
authorShawn Rutledge <shawn.rutledge@digia.com>
Thu, 21 Mar 2013 07:27:43 +0000 (08:27 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 22 Mar 2013 14:26:58 +0000 (15:26 +0100)
It's been failing in CI, not just on MacOS

Change-Id: Iba3ff400c0b8b6b0cc9a7c6bddd710d3f0e78964
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
tests/auto/quick/dialogs/tst_dialogs.cpp

index 9f0dc8e..1ab10cc 100644 (file)
@@ -82,7 +82,6 @@ void tst_dialogs::fileDialogDefaultModality()
     int visibilityChangedCount = spyVisibilityChanged.count();
     // Can't hide by clicking the main window, because dialog is modal.
     QTest::mouseClick(window, Qt::LeftButton, 0, QPoint(1000, 100));
-#ifdef Q_OS_MAC
     /*
         On the Mac, if you send an event directly to a window, the modal dialog
         doesn't block the event, so the window will process it normally. This
@@ -91,9 +90,11 @@ void tst_dialogs::fileDialogDefaultModality()
         and Qt will not even see the event. But simulating real events in the
         test framework is generally unstable. So there isn't a good way to test
         modality on the mac.
+        This test sometimes fails on other platforms too.  Maybe it's not reliable
+        to try to click the main window in a location which is outside the
+        dialog, without checking or guaranteeing it somehow.
     */
-    QSKIP("Modality test doesn't work on Mac OS");
-#endif
+    QSKIP("Modality test is flaky in general and doesn't work at all on MacOS");
     // So we expect no change in visibility.
     QCOMPARE(spyVisibilityChanged.count(), visibilityChangedCount);