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

QTest::qWait doesn't wait the specified time

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.2
    • 5.9.0
    • Testing: qtestlib
    • None
    • 35096261282bfb2d66373d290dfa35b993158bb8

    Description

      Consider the following test snippet:

          QElapsedTimer timer;
          timer.start();
          QTest::qWait(100);
          QCOMPARE(timer.elapsed(), 100);
      

      When executing this test one gets:

      FAIL!  : [snip] Compared values are not the same
         Actual   (timer.elapsed()): 99
         Expected (100)            : 100
      

      This broke some auto tests we used in KDE and which used to pass when compiling against Qt 5.7. See for example: https://build.kde.org/view/Plasma/job/Plasma%20kdecoration%20kf5-qt5%20SUSEQt5.9/4/

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            mgraesslin Martin Gräßlin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes