diff --git a/src/skin/qml/qmlplayerproxy.cpp b/src/skin/qml/qmlplayerproxy.cpp index b00c5b4210e9..b2f56e298f2f 100644 --- a/src/skin/qml/qmlplayerproxy.cpp +++ b/src/skin/qml/qmlplayerproxy.cpp @@ -33,6 +33,10 @@ QmlPlayerProxy::QmlPlayerProxy(BaseTrackPlayer* pTrackPlayer, QObject* parent = &BaseTrackPlayer::newTrackLoaded, this, &QmlPlayerProxy::slotTrackLoaded); + connect(m_pTrackPlayer, + &BaseTrackPlayer::playerEmpty, + this, + &QmlPlayerProxy::trackUnloaded); connect(this, &QmlPlayerProxy::trackChanged, this, &QmlPlayerProxy::slotTrackChanged); } @@ -53,6 +57,7 @@ void QmlPlayerProxy::slotTrackLoaded(TrackPointer pTrack) { &QmlPlayerProxy::colorChanged); } emit trackChanged(); + emit trackLoaded(); } void QmlPlayerProxy::slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOldTrack) { @@ -64,6 +69,7 @@ void QmlPlayerProxy::slotLoadingTrack(TrackPointer pNewTrack, TrackPointer pOldT } m_pCurrentTrack.reset(); emit trackChanged(); + emit trackLoading(); } void QmlPlayerProxy::slotTrackChanged() { diff --git a/src/skin/qml/qmlplayerproxy.h b/src/skin/qml/qmlplayerproxy.h index dc3f9fa16589..5777c2e48816 100644 --- a/src/skin/qml/qmlplayerproxy.h +++ b/src/skin/qml/qmlplayerproxy.h @@ -66,6 +66,9 @@ class QmlPlayerProxy : public QObject { void setColor(const QColor& color); signals: + void trackLoading(); + void trackLoaded(); + void trackUnloaded(); void trackChanged(); void albumChanged();