Use QTime instead of QElapsedTimer with Qt 4.6.

The latter has been introduced in Qt 4.7.
This commit is contained in:
Felix Geyer 2012-08-05 19:19:01 +02:00
parent 138ca8d3a3
commit 0bac9752ba

View File

@ -18,12 +18,17 @@
#include "Tools.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QElapsedTimer>
#include <QtCore/QIODevice>
#include <QtCore/QLocale>
#include <QtCore/QStringList>
#include <QtGui/QImageReader>
#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
#include <QtCore/QElapsedTimer>
#else
#include <QtCore/QTime>
#endif
#ifdef Q_OS_WIN
#include <windows.h> // for Sleep()
#endif
@ -162,7 +167,11 @@ void wait(int ms)
{
Q_ASSERT(ms > 0);
#if QT_VERSION >= QT_VERSION_CHECK(4, 7, 0)
QElapsedTimer timer;
#else
QTime timer;
#endif
timer.start();
if (ms <= 50) {