summaryrefslogtreecommitdiffstats
path: root/tests/auto/qglthreads/tst_qglthreads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qglthreads/tst_qglthreads.cpp')
-rw-r--r--tests/auto/qglthreads/tst_qglthreads.cpp37
1 files changed, 6 insertions, 31 deletions
diff --git a/tests/auto/qglthreads/tst_qglthreads.cpp b/tests/auto/qglthreads/tst_qglthreads.cpp
index 859f47f000..472379ab7a 100644
--- a/tests/auto/qglthreads/tst_qglthreads.cpp
+++ b/tests/auto/qglthreads/tst_qglthreads.cpp
@@ -46,7 +46,6 @@
#include "tst_qglthreads.h"
#ifdef Q_OS_SYMBIAN
-#include <unistd.h> // for usleep
#define RUNNING_TIME 2000 // save GPU mem by running shorter time.
#else
#define RUNNING_TIME 5000
@@ -467,11 +466,7 @@ void tst_QGLThreads::renderInThread()
qApp->processEvents();
value = -value;
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!thread.failure);
@@ -574,11 +569,7 @@ public slots:
p.drawText(rect.center(), "This is a piece of text");
p.end();
rotAngle += 2;
-#ifdef Q_WS_WIN
- Sleep(20);
-#else
- usleep(20 * 1000);
-#endif
+ QThread::msleep(20);
}
fail = beginFailed;
@@ -670,11 +661,7 @@ void tst_QGLThreads::painterOnGLWidgetInThread()
while (painterThreads.areRunning()) {
qApp->processEvents();
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!painterThreads.failed());
}
@@ -693,11 +680,7 @@ void tst_QGLThreads::painterOnPixmapInThread()
while (painterThreads.areRunning()) {
qApp->processEvents();
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!painterThreads.failed());
}
@@ -726,11 +709,7 @@ void tst_QGLThreads::painterOnPboInThread()
while (painterThreads.areRunning()) {
qApp->processEvents();
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!painterThreads.failed());
}
@@ -760,11 +739,7 @@ void tst_QGLThreads::painterOnFboInThread()
while (painterThreads.areRunning()) {
qApp->processEvents();
-#ifdef Q_WS_WIN
- Sleep(100);
-#else
- usleep(100 * 1000);
-#endif
+ QThread::msleep(100);
}
QVERIFY(!painterThreads.failed());
}