diff options
author | axis <qt-info@nokia.com> | 2009-04-24 14:03:55 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-04-27 07:09:01 (GMT) |
commit | e74c8dc65e2feffb9a55d00aee5ca634fba41df8 (patch) | |
tree | 3a131f9235fb6a455793178d8313655e4fd0036e /tests/auto/mediaobject/tst_mediaobject.cpp | |
parent | 8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (diff) | |
parent | 211bea9838bcc2acd7f54b65468fe1be2d81b1e0 (diff) | |
download | Qt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.zip Qt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.tar.gz Qt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Configure.exe recompiled with MSVC6.
Conflicts:
configure.exe
examples/network/network.pro
src/gui/dialogs/qfiledialog_p.h
src/gui/dialogs/qfilesystemmodel_p.h
src/gui/kernel/qapplication.cpp
tests/auto/_Categories/qmake.txt
tests/auto/qfile/test/test.pro
tests/auto/qfile/tst_qfile.cpp
tests/auto/qlibrary/tst_qlibrary.cpp
tests/auto/qline/tst_qline.cpp
tests/auto/qstyle/tst_qstyle.cpp
tests/auto/qtextstream/tst_qtextstream.cpp
tests/auto/qtranslator/qtranslator.pro
tests/auto/qwaitcondition/tst_qwaitcondition.cpp
translations/qt_ja_JP.ts
Diffstat (limited to 'tests/auto/mediaobject/tst_mediaobject.cpp')
-rw-r--r-- | tests/auto/mediaobject/tst_mediaobject.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp index 96589b7..1b113b2 100644 --- a/tests/auto/mediaobject/tst_mediaobject.cpp +++ b/tests/auto/mediaobject/tst_mediaobject.cpp @@ -349,6 +349,18 @@ void tst_MediaObject::_pausePlayback() void tst_MediaObject::initTestCase() { QCoreApplication::setApplicationName("tst_MediaObject"); + m_stateChangedSignalSpy = 0; + m_media = 0; + +#ifdef Q_OS_WINCE + QString pluginsPath = QLibraryInfo::location(QLibraryInfo::PluginsPath); +#ifdef DEBUG + QVERIFY(QFile::exists(pluginsPath + "/phonon_backend/phonon_waveoutd4.dll") || QFile::exists(pluginsPath + "/phonon_backend/phonon_phonon_ds9d4.dll")); +#else + QVERIFY(QFile::exists(pluginsPath + "/phonon_backend/phonon_waveout4.dll") || QFile::exists(pluginsPath + "/phonon_backend/phonon_phonon_ds94.dll")); +#endif +#endif + m_url = qgetenv("PHONON_TESTURL"); m_media = new MediaObject(this); @@ -787,7 +799,7 @@ void tst_MediaObject::setMediaAndPlay() QSignalSpy totalTimeChangedSignalSpy(m_media, SIGNAL(totalTimeChanged(qint64))); QVERIFY(m_media->currentSource().type() != MediaSource::Invalid); Phonon::State state = m_media->state(); - QVERIFY(state == Phonon::StoppedState || state == Phonon::PlayingState); + QVERIFY(state == Phonon::StoppedState || state == Phonon::PlayingState || Phonon::PausedState); m_media->setCurrentSource(m_url); // before calling play() we better make sure that if play() finishes very fast that we don't get // called again @@ -856,8 +868,10 @@ void tst_MediaObject::testPlayBeforeFinish() void tst_MediaObject::cleanupTestCase() { - delete m_stateChangedSignalSpy; - delete m_media; + if (m_stateChangedSignalSpy) + delete m_stateChangedSignalSpy; + if (m_media) + delete m_media; #ifdef Q_OS_WINCE QTest::qWait(200); #endif |