Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63855 Tasks and issues related to flaky tests
  3. QTBUG-63993

cleanup tests [qtbase]: inconsistent use of QTest::qWaitForWindowActive

    XMLWordPrintable

Details

    • Technical task
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Testing: qtestlib
    • None

    Description

      TODO - improve description.

      Clarify which is correct way of doing things and document in QTBUG-63987

      touchWidget.show();
       QVERIFY(QTest::qWaitForWindowActive(&touchWidget));
      

      VS

      window.show();
      window.requestActivate();
      QVERIFY(QTest::qWaitForWindowActive(&window));
      

      VS

      pbar.show();
      qApp->setActiveWindow(&pbar);
      QVERIFY(QTest::qWaitForWindowActive(&pbar));
      

      Regarding setActiveWindow: "Sets the active window to the active widget in response to a system event. The function is called from the platform specific event handlers." So it seems that it does not affect qWaitForWindowActive at all and should not be used like that, which is not the case with many tests.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            paeglis Gatis Paeglis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes