diff options
author | Kent Hansen <kent.hansen@nokia.com> | 2012-06-05 13:34:33 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-07 00:38:36 +0200 |
commit | 17e233e7c3bbd13f455f9299d1b714da436d0806 (patch) | |
tree | b28e261a5f3d9f215905c32d54d1d8dfa71ff649 /tests/auto/gui | |
parent | 22e6477185b7a91ae7c3c2813f1ecaff29f3e962 (diff) |
Make qmovie autotest build without widgets
Change-Id: Ie53b183e99de08c3cc35f4932b7aabf4bf5b0940
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/image/qmovie/qmovie.pro | 3 | ||||
-rw-r--r-- | tests/auto/gui/image/qmovie/tst_qmovie.cpp | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/gui/image/qmovie/qmovie.pro b/tests/auto/gui/image/qmovie/qmovie.pro index fc2c5708b0..b02ba29298 100644 --- a/tests/auto/gui/image/qmovie/qmovie.pro +++ b/tests/auto/gui/image/qmovie/qmovie.pro @@ -1,7 +1,8 @@ CONFIG += testcase CONFIG += parallel_test TARGET = tst_qmovie -QT += widgets testlib +QT += testlib +!contains(QT_CONFIG, no-widgets): QT += widgets SOURCES += tst_qmovie.cpp MOC_DIR=tmp diff --git a/tests/auto/gui/image/qmovie/tst_qmovie.cpp b/tests/auto/gui/image/qmovie/tst_qmovie.cpp index e60d41f5ed..45ee38578c 100644 --- a/tests/auto/gui/image/qmovie/tst_qmovie.cpp +++ b/tests/auto/gui/image/qmovie/tst_qmovie.cpp @@ -44,7 +44,9 @@ #include <QIODevice> +#ifndef QT_NO_WIDGETS #include <QLabel> +#endif #include <QMovie> class tst_QMovie : public QObject @@ -70,7 +72,9 @@ private slots: void jumpToFrame_data(); void jumpToFrame(); void changeMovieFile(); +#ifndef QT_NO_WIDGETS void infiniteLoop(); +#endif }; // Testing get/set functions @@ -167,6 +171,7 @@ void tst_QMovie::playMovie() connect(&movie, SIGNAL(finished()), this, SLOT(exitLoopSlot())); +#ifndef QT_NO_WIDGETS QLabel label; label.setMovie(&movie); label.show(); @@ -177,6 +182,7 @@ void tst_QMovie::playMovie() QCOMPARE(movie.state(), QMovie::NotRunning); QCOMPARE(movie.frameCount(), frameCount); +#endif } void tst_QMovie::jumpToFrame_data() @@ -203,6 +209,7 @@ void tst_QMovie::changeMovieFile() QVERIFY(movie.currentFrameNumber() == -1); } +#ifndef QT_NO_WIDGETS void tst_QMovie::infiniteLoop() { QLabel label; @@ -214,6 +221,7 @@ void tst_QMovie::infiniteLoop() QTestEventLoop::instance().enterLoop(1); QTestEventLoop::instance().timeout(); } +#endif QTEST_MAIN(tst_QMovie) #include "tst_qmovie.moc" |