diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-25 02:43:24 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-25 03:35:21 (GMT) |
commit | cccfbf4e2ad80c47b96e08765858c1cd4365a312 (patch) | |
tree | b12cfc2b6b901ed20dc2fc44afc81af7a3b41a12 /src | |
parent | e9f3edcb0a0223b90606108993999ad3cb37af9f (diff) | |
download | Qt-cccfbf4e2ad80c47b96e08765858c1cd4365a312.zip Qt-cccfbf4e2ad80c47b96e08765858c1cd4365a312.tar.gz Qt-cccfbf4e2ad80c47b96e08765858c1cd4365a312.tar.bz2 |
QMediaContent: Add a convenience method to retrieve the QNetworkRequest.
Reviewed-by: Andrew den Exter
Diffstat (limited to 'src')
-rw-r--r-- | src/multimedia/base/qmediacontent.cpp | 9 | ||||
-rw-r--r-- | src/multimedia/base/qmediacontent.h | 1 |
2 files changed, 10 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; |