Bind the playlist connected to a player.
Change-Id: I3c2e00773c88f671bdffcfe8c8175330ca405d4a Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
This commit is contained in:
committed by
Yoann Lopes
parent
ae9095d5bc
commit
b05e9d99c2
@@ -465,6 +465,7 @@ void QMediaPlayerPrivate::disconnectPlaylist()
|
||||
QObject::disconnect(playlist, SIGNAL(currentMediaChanged(QMediaContent)),
|
||||
q, SLOT(_q_updateMedia(QMediaContent)));
|
||||
QObject::disconnect(playlist, SIGNAL(destroyed()), q, SLOT(_q_playlistDestroyed()));
|
||||
q->unbind(playlist);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -472,6 +473,7 @@ void QMediaPlayerPrivate::connectPlaylist()
|
||||
{
|
||||
Q_Q(QMediaPlayer);
|
||||
if (playlist) {
|
||||
q->bind(playlist);
|
||||
QObject::connect(playlist, SIGNAL(currentMediaChanged(QMediaContent)),
|
||||
q, SLOT(_q_updateMedia(QMediaContent)));
|
||||
QObject::connect(playlist, SIGNAL(destroyed()), q, SLOT(_q_playlistDestroyed()));
|
||||
|
||||
Reference in New Issue
Block a user