Make qmovie autotest build without widgets
Change-Id: Ie53b183e99de08c3cc35f4932b7aabf4bf5b0940 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
This commit is contained in:
parent
22e6477185
commit
17e233e7c3
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user