Update background audio element to use new service name

Change-Id: I8f0480e4fb40b034f75dcd900f2d440fd0e7610d
Reviewed-on: http://codereview.qt-project.org/4493
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: derick hawcroft <derick.hawcroft@nokia.com>
This commit is contained in:
Ling Hu
2011-09-09 11:25:53 +10:00
committed by Qt by Nokia
parent ee0ea8c442
commit 989aefc5f1
3 changed files with 6 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ void QDeclarativeBackgroundAudio::classBegin()
void QDeclarativeBackgroundAudio::componentComplete()
{
setObject(this, QMediaServiceProviderHint(QMediaServiceProviderHint::BackgroundPlayback));
setObject(this, Q_MEDIASERVICE_BACKGROUNDMEDIAPLAYER);
if (m_mediaService) {
m_backgroundPlaybackControl =
static_cast<QMediaBackgroundPlaybackControl*>(
@@ -61,6 +61,8 @@ void QDeclarativeBackgroundAudio::componentComplete()
} else {
qWarning("can not get QMediaBackgroundPlaybackControl!");
}
} else {
qWarning("Unable to get any background mediaplayer!");
}
QDeclarativeMediaBase::componentComplete();
}