summaryrefslogtreecommitdiffstats
path: root/src/multimedia/qml/qmlmediabase.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2010-02-05 01:11:29 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2010-02-05 01:11:29 (GMT)
commite6c91eacfefcaf9cab83f5cb82d1487b8a870117 (patch)
tree64672c65e9ce1c90e8109a7d6cda0276bdc68278 /src/multimedia/qml/qmlmediabase.cpp
parent275d642215388013247e07d4b351be88422bff41 (diff)
downloadQt-e6c91eacfefcaf9cab83f5cb82d1487b8a870117.zip
Qt-e6c91eacfefcaf9cab83f5cb82d1487b8a870117.tar.gz
Qt-e6c91eacfefcaf9cab83f5cb82d1487b8a870117.tar.bz2
Propagate error signals from QMediaPlayerControl to media QML elements.
Diffstat (limited to 'src/multimedia/qml/qmlmediabase.cpp')
-rw-r--r--src/multimedia/qml/qmlmediabase.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/multimedia/qml/qmlmediabase.cpp b/src/multimedia/qml/qmlmediabase.cpp
index 4b42058..17ec8a6 100644
--- a/src/multimedia/qml/qmlmediabase.cpp
+++ b/src/multimedia/qml/qmlmediabase.cpp
@@ -270,6 +270,8 @@ void QmlMediaBase::setObject(QObject *object)
object, SIGNAL(seekableChanged()));
QObject::connect(m_playerControl, SIGNAL(playbackRateChanged(qreal)),
object, SIGNAL(playbackRateChanged()));
+ QObject::connect(m_playerControl, SIGNAL(error(int,QString)),
+ object, SLOT(_q_error(int,QString)));
m_animation = new QmlMediaBaseAnimation(this);
} else {
@@ -293,6 +295,13 @@ QUrl QmlMediaBase::source() const
void QmlMediaBase::setSource(const QUrl &url)
{
+ if (m_error != QMediaPlayer::ServiceMissingError && m_error != QMediaPlayer::NoError) {
+ m_error = QMediaPlayer::NoError;
+ m_errorString = QString();
+
+ emit errorChanged();
+ }
+
m_playerControl->setMedia(QMediaContent(url), 0);
}