summaryrefslogtreecommitdiffstats
path: root/src/testlib/qtesteventloop.h
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2012-07-14 01:37:53 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-25 13:31:14 +0200
commit790aca0ea1bbd33a8ff29c83c0ab0bd968304f03 (patch)
treed8b708fe722a72baeb040630160081532e19cf10 /src/testlib/qtesteventloop.h
parent3a27d4b480214072d972ac67561f2ee4010f8baa (diff)
Add QSignalSpy::wait() method.
Change-Id: I1f3b49e3dee19bf0b1d2933c6e6ad7972186e0d0 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Diffstat (limited to 'src/testlib/qtesteventloop.h')
-rw-r--r--src/testlib/qtesteventloop.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/testlib/qtesteventloop.h b/src/testlib/qtesteventloop.h
index 98d69963ca..3f08a93b69 100644
--- a/src/testlib/qtesteventloop.h
+++ b/src/testlib/qtesteventloop.h
@@ -61,8 +61,9 @@ class Q_TESTLIB_EXPORT QTestEventLoop : public QObject
public:
inline QTestEventLoop(QObject *aParent = 0)
: QObject(aParent), inLoop(false), _timeout(false), timerId(-1), loop(0) {}
- inline void enterLoop(int secs);
+ inline void enterLoopMSecs(int ms);
+ inline void enterLoop(int secs) { enterLoopMSecs(secs * 1000); }
inline void changeInterval(int secs)
{ killTimer(timerId); timerId = startTimer(secs * 1000); }
@@ -92,7 +93,7 @@ private:
QEventLoop *loop;
};
-inline void QTestEventLoop::enterLoop(int secs)
+inline void QTestEventLoop::enterLoopMSecs(int ms)
{
Q_ASSERT(!loop);
@@ -101,7 +102,7 @@ inline void QTestEventLoop::enterLoop(int secs)
inLoop = true;
_timeout = false;
- timerId = startTimer(secs * 1000);
+ timerId = startTimer(ms);
loop = &l;
l.exec();