diff options
author | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2010-02-25 03:44:53 (GMT) |
---|---|---|
committer | Dmytro Poplavskiy <dmytro.poplavskiy@nokia.com> | 2010-02-25 03:44:53 (GMT) |
commit | 77b5ffdbd0ad933ef5e4a50ee1660ea1b8f7c8cf (patch) | |
tree | 6c978346462803f6b8f70fa442fc3441a66dd347 | |
parent | 9a8a35d829ff62fa7ea213ff31f52f0dee00ec78 (diff) | |
parent | cccfbf4e2ad80c47b96e08765858c1cd4365a312 (diff) | |
download | Qt-77b5ffdbd0ad933ef5e4a50ee1660ea1b8f7c8cf.zip Qt-77b5ffdbd0ad933ef5e4a50ee1660ea1b8f7c8cf.tar.gz Qt-77b5ffdbd0ad933ef5e4a50ee1660ea1b8f7c8cf.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-multimedia-staging
-rw-r--r-- | src/multimedia/base/qmediacontent.cpp | 9 | ||||
-rw-r--r-- | src/multimedia/base/qmediacontent.h | 1 | ||||
-rw-r--r-- | tests/auto/qmediacontent/tst_qmediacontent.cpp | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/multimedia/base/qmediacontent.cpp b/src/multimedia/base/qmediacontent.cpp index fd519c6..dd0c315 100644 --- a/src/multimedia/base/qmediacontent.cpp +++ b/src/multimedia/base/qmediacontent.cpp @@ -206,6 +206,15 @@ QUrl QMediaContent::canonicalUrl() const } /*! + Returns a QNetworkRequest that represents that canonical resource for this media content. +*/ + +QNetworkRequest QMediaContent::canonicalRequest() const +{ + return canonicalResource().request(); +} + +/*! Returns a QMediaResource that represents that canonical resource for this media content. */ diff --git a/src/multimedia/base/qmediacontent.h b/src/multimedia/base/qmediacontent.h index b6f3017..5a279c1 100644 --- a/src/multimedia/base/qmediacontent.h +++ b/src/multimedia/base/qmediacontent.h @@ -75,6 +75,7 @@ public: bool isNull() const; QUrl canonicalUrl() const; + QNetworkRequest canonicalRequest() const; QMediaResource canonicalResource() const; QMediaResourceList resources() const; diff --git a/tests/auto/qmediacontent/tst_qmediacontent.cpp b/tests/auto/qmediacontent/tst_qmediacontent.cpp index 8987241..a0a9bdb 100644 --- a/tests/auto/qmediacontent/tst_qmediacontent.cpp +++ b/tests/auto/qmediacontent/tst_qmediacontent.cpp @@ -85,6 +85,7 @@ void tst_QMediaContent::testRequestCtor() QMediaContent media(request); + QCOMPARE(media.canonicalRequest(), request); QCOMPARE(media.canonicalUrl(), QUrl("http://example.com/movie.mov")); QCOMPARE(media.canonicalResource().request(), request); QCOMPARE(media.canonicalResource().url(), QUrl("http://example.com/movie.mov")); |