Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30513

tst_dialogs fails too often

    XMLWordPrintable

Details

    • macOS
    • 653e690923426dc8253e2adb155b1d108d934833 922c96767923310eb19e81ae9b42d4d19f9ce151, Windows crash fix: c03d0a984682ce5cea5a5882bab0075318b18f08 (5.2)

    Description

      Example of failure:

      http://testresults.qt-project.org/ci/QtBase_dev_Integration/build_00777/revdep-qtdeclarative_linux-g++_developer-build_qtnamespace_qtlibinfix_Ubuntu_11.10_x64/log.txt.gz

      (happened while integrating change https://codereview.qt-project.org/52728 )

      The test has a big Window with a MouseArea which tries to toggle visibility of the FileDialog. So if the dialog is modal you will be able to show it but not hide it by clicking on the big window; and if the dialog is non-modal you will be able to both show it and hide it. But the question is where to click in order to try that test?

      If the dialog is transient for the window (as it should be), then it should pop up centered on the window on every platform. But there is an issue with that on Linux, so it can pop up on top of the hard-coded coordinates where the test tries to click the big window. (It could also be such a huge dialog that it covers the whole window. For example, GTK remembers the size every time you resize the file dialog, and future file dialogs will be that size by default. It's a convenient feature in actual use.) And, we cannot find the actual onscreen geometry of a QPA dialog, because there is no API for that. The reason for that in turn is that GTK doesn't have an API to get the geometry of a file dialog. To add such API to the dialog helper, it would be nice if it always worked. If that worked, then the test could find a location to click which is outside the dialog but inside the window (as long as it's not completely covered).

      On the mac, if the dialog is modal, then the big window will not even see a real mouse click, because the OS will filter the mouse event; so by sending a simulated mouse event, it's not a realistic test: in real life the window would not have seen the click, so there's no reason for it to have code to ignore the event when we send one. And it has been agreed that it's not reliable in general to test by sending real-world events.

      On Windows though, a native file dialog is always modal, so the test has been passing on Windows so far.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes