summaryrefslogtreecommitdiffstats
path: root/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm')
-rw-r--r--src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
index 024f7b0..0405bbd 100644
--- a/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
+++ b/src/plugins/mediaservices/qt7/mediaplayer/qt7playersession.mm
@@ -153,10 +153,9 @@
QT_BEGIN_NAMESPACE
-static CFStringRef qString2CFStringRef(const QString &string)
+static inline NSString *qString2CFStringRef(const QString &string)
{
- return CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar *>(string.unicode()),
- string.length());
+ return [NSString stringWithCharacters:reinterpret_cast<const UniChar *>(string.unicode()) length:string.length()];
}
QT7PlayerSession::QT7PlayerSession(QObject *parent)
@@ -391,10 +390,10 @@ void QT7PlayerSession::setMedia(const QMediaContent &content, QIODevice *stream)
foreach (const QNetworkCookie &requestCookie, cookieList) {
NSMutableDictionary *p = [NSMutableDictionary dictionaryWithObjectsAndKeys:
- (NSString*)qString2CFStringRef(requestCookie.name()), NSHTTPCookieName,
- (NSString*)qString2CFStringRef(requestCookie.value()), NSHTTPCookieValue,
- (NSString*)qString2CFStringRef(requestCookie.domain()), NSHTTPCookieDomain,
- (NSString*)qString2CFStringRef(requestCookie.path()), NSHTTPCookiePath,
+ qString2CFStringRef(requestCookie.name()), NSHTTPCookieName,
+ qString2CFStringRef(requestCookie.value()), NSHTTPCookieValue,
+ qString2CFStringRef(requestCookie.domain()), NSHTTPCookieDomain,
+ qString2CFStringRef(requestCookie.path()), NSHTTPCookiePath,
nil
];
if (requestCookie.isSessionCookie())
@@ -407,7 +406,7 @@ void QT7PlayerSession::setMedia(const QMediaContent &content, QIODevice *stream)
}
NSError *err = 0;
- NSString *urlString = (NSString *)qString2CFStringRef(request.url().toString());
+ NSString *urlString = qString2CFStringRef(request.url().toString());
NSDictionary *attr = [NSDictionary dictionaryWithObjectsAndKeys:
[NSURL URLWithString:urlString], QTMovieURLAttribute,