diff options
author | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-08-03 09:17:33 (GMT) |
---|---|---|
committer | Gareth Stockwell <ext-gareth.stockwell@nokia.com> | 2010-08-03 09:21:06 (GMT) |
commit | 3246586d5a98465c38c21f191e9714e821788958 (patch) | |
tree | dab38c47279caab4945c984edc4b58da5c4a6f15 /tests/auto | |
parent | 58c1ca0f480aa8b39b01495566b73be7756cf568 (diff) | |
download | Qt-3246586d5a98465c38c21f191e9714e821788958.zip Qt-3246586d5a98465c38c21f191e9714e821788958.tar.gz Qt-3246586d5a98465c38c21f191e9714e821788958.tar.bz2 |
Fixed test regression on Mac
Mac Phonon backend does not support opening a resource file via the
MediaSource(const QString &) overload. The MediaSource(QIODevice *)
overload must be used. The Symbian backend, on the other hand,
requires the former overload to be used.
Task-number: QTBUG-6562
Reviewed-by: trustme
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/mediaobject/tst_mediaobject.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/mediaobject/tst_mediaobject.cpp b/tests/auto/mediaobject/tst_mediaobject.cpp index 613a086..6367392 100644 --- a/tests/auto/mediaobject/tst_mediaobject.cpp +++ b/tests/auto/mediaobject/tst_mediaobject.cpp @@ -202,7 +202,12 @@ void tst_MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstat void tst_MediaObject::testPlayFromResource() { MediaObject media; +#ifdef Q_OS_SYMBIAN media.setCurrentSource(Phonon::MediaSource(MEDIA_FILEPATH)); +#else + QFile file(MEDIA_FILEPATH); + media.setCurrentSource(&file); +#endif QVERIFY(media.state() != Phonon::ErrorState); if (media.state() != Phonon::StoppedState) QTest::waitForSignal(&media, SIGNAL(stateChanged(Phonon::State, Phonon::State)), 10000); |