diff options
author | Mike FABIAN <mike.fabian@basyskom.de> | 2010-07-21 13:52:48 +0200 |
---|---|---|
committer | Mike FABIAN <mike.fabian@basyskom.de> | 2010-07-21 14:04:08 +0200 |
commit | c98b4ac3b0097d790c936b9221ee4c8b1796cf7f (patch) | |
tree | c9f479d6d88c02a64c901e5e6a5a002d210a495d /tests | |
parent | e2630a139542b298fd498f122c5d3b3e9fa144cb (diff) |
Changes: fix mcity.cpp and ut_mlocationdatabase.cpp to compile also for Qt < 4.7
RevBy: Miroslav Safr
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ut_mlocationdatabase/ut_mlocationdatabase.cpp | 5 | ||||
-rw-r--r-- | tests/ut_mlocationdatabase/ut_mlocationdatabase.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/ut_mlocationdatabase/ut_mlocationdatabase.cpp b/tests/ut_mlocationdatabase/ut_mlocationdatabase.cpp index eb33a239..d17e882d 100644 --- a/tests/ut_mlocationdatabase/ut_mlocationdatabase.cpp +++ b/tests/ut_mlocationdatabase/ut_mlocationdatabase.cpp @@ -391,8 +391,10 @@ void Ut_MLocationDatabase::testCitiesDumpInfo() // This test dumps lots of information from the database to detect // changes and serves as a simple benchmark whether all the // information can be gathered in reasonable time. +#if QT_VERSION >= 0x040700 QElapsedTimer timer; timer.start(); +#endif MLocationDatabase db; QList<MCity> cities = db.cities(); @@ -460,8 +462,9 @@ void Ut_MLocationDatabase::testCitiesDumpInfo() // what has changed: QProcess::execute("diff -u " + ut_mlocationdatabaseTestInputFileName + ' ' + ut_mlocationdatabaseTestOutputFileName); } - +#if QT_VERSION >= 0x040700 qDebug() << __PRETTY_FUNCTION__ << "took" << timer.restart() << "milliseconds"; +#endif } QTEST_APPLESS_MAIN(Ut_MLocationDatabase); diff --git a/tests/ut_mlocationdatabase/ut_mlocationdatabase.h b/tests/ut_mlocationdatabase/ut_mlocationdatabase.h index 996470ea..ab70d58a 100644 --- a/tests/ut_mlocationdatabase/ut_mlocationdatabase.h +++ b/tests/ut_mlocationdatabase/ut_mlocationdatabase.h @@ -22,7 +22,9 @@ #include <QtTest/QtTest> #include <QObject> +#if QT_VERSION >= 0x040700 #include <QElapsedTimer> +#endif #include <MApplication> #include <MLocale> |