diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-19 07:05:50 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-19 07:05:50 (GMT) |
commit | 723d412d2b3fcb2f64594ff75ad94d469285aeb1 (patch) | |
tree | 2bf811bfbd59be616599a9d10a2aa7db60e05c01 /tests | |
parent | 6fa813a4d5b46523940f6af8ed74e6855bad49c9 (diff) | |
download | Qt-723d412d2b3fcb2f64594ff75ad94d469285aeb1.zip Qt-723d412d2b3fcb2f64594ff75ad94d469285aeb1.tar.gz Qt-723d412d2b3fcb2f64594ff75ad94d469285aeb1.tar.bz2 |
Complete namespace move; QtMedia -> QtMultimedia
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qmediaobject/tst_qmediaobject.cpp | 38 | ||||
-rw-r--r-- | tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp | 32 | ||||
-rw-r--r-- | tests/auto/qmlaudio/tst_qmlaudio.cpp | 22 | ||||
-rw-r--r-- | tests/auto/qmlgraphicsvideo/tst_qmlgraphicsvideo.cpp | 2 |
4 files changed, 47 insertions, 47 deletions
diff --git a/tests/auto/qmediaobject/tst_qmediaobject.cpp b/tests/auto/qmediaobject/tst_qmediaobject.cpp index 1dbb2c1..2128b35 100644 --- a/tests/auto/qmediaobject/tst_qmediaobject.cpp +++ b/tests/auto/qmediaobject/tst_qmediaobject.cpp @@ -93,13 +93,13 @@ public: if (m_available != available) emit metaDataAvailableChanged(m_available = available); } - QList<QtMedia::MetaData> availableMetaData() const { return m_data.keys(); } + QList<QtMultimedia::MetaData> availableMetaData() const { return m_data.keys(); } bool isWritable() const { return m_writable; } void setWritable(bool writable) { emit writableChanged(m_writable = writable); } - QVariant metaData(QtMedia::MetaData key) const { return m_data.value(key); } - void setMetaData(QtMedia::MetaData key, const QVariant &value) { + QVariant metaData(QtMultimedia::MetaData key) const { return m_data.value(key); } + void setMetaData(QtMultimedia::MetaData key, const QVariant &value) { m_data.insert(key, value); } QVariant extendedMetaData(const QString &key) const { return m_extendedData.value(key); } @@ -117,7 +117,7 @@ public: bool m_available; bool m_writable; - QMap<QtMedia::MetaData, QVariant> m_data; + QMap<QtMultimedia::MetaData, QVariant> m_data; QMap<QString, QVariant> m_extendedData; }; @@ -376,12 +376,12 @@ void tst_QMediaObject::nullMetaDataControl() QCOMPARE(object.isMetaDataAvailable(), false); QCOMPARE(object.isMetaDataWritable(), false); - object.setMetaData(QtMedia::Title, title); + object.setMetaData(QtMultimedia::Title, title); object.setExtendedMetaData(titleKey, title); - QCOMPARE(object.metaData(QtMedia::Title).toString(), QString()); + QCOMPARE(object.metaData(QtMultimedia::Title).toString(), QString()); QCOMPARE(object.extendedMetaData(titleKey).toString(), QString()); - QCOMPARE(object.availableMetaData(), QList<QtMedia::MetaData>()); + QCOMPARE(object.availableMetaData(), QList<QtMultimedia::MetaData>()); QCOMPARE(object.availableExtendedMetaData(), QStringList()); QCOMPARE(spy.count(), 0); } @@ -470,18 +470,18 @@ void tst_QMediaObject::metaData() QtTestMediaObject object(&service); QVERIFY(object.availableMetaData().isEmpty()); - service.metaData.m_data.insert(QtMedia::AlbumArtist, artist); - service.metaData.m_data.insert(QtMedia::Title, title); - service.metaData.m_data.insert(QtMedia::Genre, genre); + service.metaData.m_data.insert(QtMultimedia::AlbumArtist, artist); + service.metaData.m_data.insert(QtMultimedia::Title, title); + service.metaData.m_data.insert(QtMultimedia::Genre, genre); - QCOMPARE(object.metaData(QtMedia::AlbumArtist).toString(), artist); - QCOMPARE(object.metaData(QtMedia::Title).toString(), title); + QCOMPARE(object.metaData(QtMultimedia::AlbumArtist).toString(), artist); + QCOMPARE(object.metaData(QtMultimedia::Title).toString(), title); - QList<QtMedia::MetaData> metaDataKeys = object.availableMetaData(); + QList<QtMultimedia::MetaData> metaDataKeys = object.availableMetaData(); QCOMPARE(metaDataKeys.size(), 3); - QVERIFY(metaDataKeys.contains(QtMedia::AlbumArtist)); - QVERIFY(metaDataKeys.contains(QtMedia::Title)); - QVERIFY(metaDataKeys.contains(QtMedia::Genre)); + QVERIFY(metaDataKeys.contains(QtMultimedia::AlbumArtist)); + QVERIFY(metaDataKeys.contains(QtMultimedia::Title)); + QVERIFY(metaDataKeys.contains(QtMultimedia::Genre)); } void tst_QMediaObject::setMetaData_data() @@ -501,9 +501,9 @@ void tst_QMediaObject::setMetaData() QtTestMediaObject object(&service); - object.setMetaData(QtMedia::Title, title); - QCOMPARE(object.metaData(QtMedia::Title).toString(), title); - QCOMPARE(service.metaData.m_data.value(QtMedia::Title).toString(), title); + object.setMetaData(QtMultimedia::Title, title); + QCOMPARE(object.metaData(QtMultimedia::Title).toString(), title); + QCOMPARE(service.metaData.m_data.value(QtMultimedia::Title).toString(), title); } void tst_QMediaObject::extendedMetaData() diff --git a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp index 9409394..9bca189 100644 --- a/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp +++ b/tests/auto/qmediaserviceprovider/tst_qmediaserviceprovider.cpp @@ -88,16 +88,16 @@ public: delete service; } - QtMedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const + QtMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const { if (codecs.contains(QLatin1String("mpeg4"))) - return QtMedia::NotSupported; + return QtMultimedia::NotSupported; if (mimeType == "audio/ogg") { - return QtMedia::ProbablySupported; + return QtMultimedia::ProbablySupported; } - return QtMedia::MaybeSupported; + return QtMultimedia::MaybeSupported; } QStringList supportedMimeTypes() const @@ -147,14 +147,14 @@ public: delete service; } - QtMedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const + QtMultimedia::SupportEstimate hasSupport(const QString &mimeType, const QStringList& codecs) const { Q_UNUSED(codecs); if (mimeType == "audio/wav") - return QtMedia::PreferedService; + return QtMultimedia::PreferedService; - return QtMedia::NotSupported; + return QtMultimedia::NotSupported; } QStringList supportedMimeTypes() const @@ -282,7 +282,7 @@ void tst_QMediaServiceProvider::testHasSupport() { MockMediaServiceProvider mockProvider; QCOMPARE(mockProvider.hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/ogv", QStringList()), - QtMedia::MaybeSupported); + QtMultimedia::MaybeSupported); QMediaServiceProvider *provider = QMediaServiceProvider::defaultServiceProvider(); @@ -290,27 +290,27 @@ void tst_QMediaServiceProvider::testHasSupport() QSKIP("No default provider", SkipSingle); QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/ogv", QStringList()), - QtMedia::MaybeSupported); + QtMultimedia::MaybeSupported); QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "audio/ogg", QStringList()), - QtMedia::ProbablySupported); + QtMultimedia::ProbablySupported); //while the service returns PreferredService, provider should return ProbablySupported QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "audio/wav", QStringList()), - QtMedia::ProbablySupported); + QtMultimedia::ProbablySupported); //even while all the plugins with "hasSupport" returned NotSupported, //MockServicePlugin3 has no "hasSupport" interface, so MaybeSupported QCOMPARE(provider->hasSupport(QByteArray(Q_MEDIASERVICE_MEDIAPLAYER), "video/avi", QStringList() << "mpeg4"), - QtMedia::MaybeSupported); + QtMultimedia::MaybeSupported); QCOMPARE(provider->hasSupport(QByteArray("non existing service"), "video/ogv", QStringList()), - QtMedia::NotSupported); + QtMultimedia::NotSupported); - QCOMPARE(QMediaPlayer::hasSupport("video/ogv"), QtMedia::MaybeSupported); - QCOMPARE(QMediaPlayer::hasSupport("audio/ogg"), QtMedia::ProbablySupported); - QCOMPARE(QMediaPlayer::hasSupport("audio/wav"), QtMedia::ProbablySupported); + QCOMPARE(QMediaPlayer::hasSupport("video/ogv"), QtMultimedia::MaybeSupported); + QCOMPARE(QMediaPlayer::hasSupport("audio/ogg"), QtMultimedia::ProbablySupported); + QCOMPARE(QMediaPlayer::hasSupport("audio/wav"), QtMultimedia::ProbablySupported); //ensure the correct media player plugin is choosen for mime type QMediaPlayer simplePlayer(0, QMediaPlayer::LowLatency); diff --git a/tests/auto/qmlaudio/tst_qmlaudio.cpp b/tests/auto/qmlaudio/tst_qmlaudio.cpp index cb205ac..068317f 100644 --- a/tests/auto/qmlaudio/tst_qmlaudio.cpp +++ b/tests/auto/qmlaudio/tst_qmlaudio.cpp @@ -76,7 +76,7 @@ private slots: void error(); }; -Q_DECLARE_METATYPE(QtMedia::MetaData); +Q_DECLARE_METATYPE(QtMultimedia::MetaData); Q_DECLARE_METATYPE(QmlAudio::Error); class QtTestMediaPlayerControl : public QMediaPlayerControl @@ -192,20 +192,20 @@ public: bool isWritable() const { return true; } bool isMetaDataAvailable() const { return true; } - QVariant metaData(QtMedia::MetaData key) const { return m_metaData.value(key); } - void setMetaData(QtMedia::MetaData key, const QVariant &value) { + QVariant metaData(QtMultimedia::MetaData key) const { return m_metaData.value(key); } + void setMetaData(QtMultimedia::MetaData key, const QVariant &value) { m_metaData.insert(key, value); emit metaDataChanged(); } - void setMetaData(const QMap<QtMedia::MetaData, QVariant> &metaData) { + void setMetaData(const QMap<QtMultimedia::MetaData, QVariant> &metaData) { m_metaData = metaData; emit metaDataChanged(); } - QList<QtMedia::MetaData> availableMetaData() const { return m_metaData.keys(); } + QList<QtMultimedia::MetaData> availableMetaData() const { return m_metaData.keys(); } QVariant extendedMetaData(const QString &) const { return QVariant(); } void setExtendedMetaData(const QString &, const QVariant &) {} QStringList availableExtendedMetaData() const { return QStringList(); } private: - QMap<QtMedia::MetaData, QVariant> m_metaData; + QMap<QtMultimedia::MetaData, QVariant> m_metaData; }; class QtTestMediaService : public QMediaService @@ -1108,25 +1108,25 @@ void tst_QmlAudio::status() void tst_QmlAudio::metaData_data() { QTest::addColumn<QByteArray>("propertyName"); - QTest::addColumn<QtMedia::MetaData>("propertyKey"); + QTest::addColumn<QtMultimedia::MetaData>("propertyKey"); QTest::addColumn<QVariant>("value1"); QTest::addColumn<QVariant>("value2"); QTest::newRow("title") << QByteArray("title") - << QtMedia::Title + << QtMultimedia::Title << QVariant(QString::fromLatin1("This is a title")) << QVariant(QString::fromLatin1("This is another title")); QTest::newRow("genre") << QByteArray("genre") - << QtMedia::Genre + << QtMultimedia::Genre << QVariant(QString::fromLatin1("rock")) << QVariant(QString::fromLatin1("pop")); QTest::newRow("trackNumber") << QByteArray("trackNumber") - << QtMedia::TrackNumber + << QtMultimedia::TrackNumber << QVariant(8) << QVariant(12); } @@ -1134,7 +1134,7 @@ void tst_QmlAudio::metaData_data() void tst_QmlAudio::metaData() { QFETCH(QByteArray, propertyName); - QFETCH(QtMedia::MetaData, propertyKey); + QFETCH(QtMultimedia::MetaData, propertyKey); QFETCH(QVariant, value1); QFETCH(QVariant, value2); diff --git a/tests/auto/qmlgraphicsvideo/tst_qmlgraphicsvideo.cpp b/tests/auto/qmlgraphicsvideo/tst_qmlgraphicsvideo.cpp index a09a6a2..0da094d 100644 --- a/tests/auto/qmlgraphicsvideo/tst_qmlgraphicsvideo.cpp +++ b/tests/auto/qmlgraphicsvideo/tst_qmlgraphicsvideo.cpp @@ -73,7 +73,7 @@ private slots: void geometry(); }; -Q_DECLARE_METATYPE(QtMedia::MetaData); +Q_DECLARE_METATYPE(QtMultimedia::MetaData); Q_DECLARE_METATYPE(QmlGraphicsVideo::Error); class QtTestMediaPlayerControl : public QMediaPlayerControl |