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

    • Type: Technical task
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: Testing: qtestlib
    • Labels:
      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

            Assignee:
            Unassigned Unassigned
            Reporter:
            paeglis Gatis Paeglis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes