From e0f654ceb4a46ed60351743090dbc13ea8b92106 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 19 Feb 2010 10:15:44 +0100 Subject: Port QTest::qWait also to use QTimestamp. To avoid using QTimestamp to test QTimestamp, use QTest::qSleep in QTimestamp's own testcase. --- src/testlib/qtestsystem.h | 4 ++-- tests/auto/qtimestamp/tst_qtimestamp.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h index 3c11cdd..54da114 100644 --- a/src/testlib/qtestsystem.h +++ b/src/testlib/qtestsystem.h @@ -44,7 +44,7 @@ #include #include -#include +#include QT_BEGIN_HEADER @@ -63,7 +63,7 @@ namespace QTest { Q_ASSERT(QCoreApplication::instance()); - QTime timer; + QTimestamp timer; timer.start(); do { QCoreApplication::processEvents(QEventLoop::AllEvents, ms); diff --git a/tests/auto/qtimestamp/tst_qtimestamp.cpp b/tests/auto/qtimestamp/tst_qtimestamp.cpp index ab1e959..79138ce 100644 --- a/tests/auto/qtimestamp/tst_qtimestamp.cpp +++ b/tests/auto/qtimestamp/tst_qtimestamp.cpp @@ -63,7 +63,7 @@ void tst_QTimestamp::elapsed() QTimestamp t1; t1.start(); - QTest::qWait(4*minResolution); + QTest::qSleep(4*minResolution); QTimestamp t2; t2.start(); -- cgit v0.12