Commit 310cf118 authored by Alexander Stippich's avatar Alexander Stippich
Browse files

rename signals for clarification

parent e19a783e
......@@ -427,7 +427,7 @@ void MediaPlayListTest::undoClearPlayListCase()
QSignalSpy newEntryInListSpy(&myPlayList, &MediaPlayList::newEntryInList);
QSignalSpy newUrlInListSpy(&myPlayList, &MediaPlayList::newUrlInList);
QSignalSpy currentTrackChangedSpy(&myPlayList, &MediaPlayList::currentTrackChanged);
QSignalSpy displayUndoInlineSpy(&myPlayList, &MediaPlayList::displayUndoInline);
QSignalSpy displayUndoNotificationSpy(&myPlayList, &MediaPlayList::displayUndoNotification);
QCOMPARE(rowsAboutToBeRemovedSpy.count(), 0);
QCOMPARE(rowsAboutToBeMovedSpy.count(), 0);
......@@ -572,7 +572,7 @@ void MediaPlayListTest::undoClearPlayListCase()
QCOMPARE(newTrackByNameInListSpy.count(), 0);
QCOMPARE(newEntryInListSpy.count(), 7);
QCOMPARE(currentTrackChangedSpy.count(), 3);
QCOMPARE(displayUndoInlineSpy.count(), 1);
QCOMPARE(displayUndoNotificationSpy.count(), 1);
QCOMPARE(myPlayList.rowCount(), 6);
......@@ -636,7 +636,7 @@ void MediaPlayListTest::undoReplacePlayListCase()
QSignalSpy newEntryInListSpy(&myPlayList, &MediaPlayList::newEntryInList);
QSignalSpy newUrlInListSpy(&myPlayList, &MediaPlayList::newUrlInList);
QSignalSpy currentTrackChangedSpy(&myPlayList, &MediaPlayList::currentTrackChanged);
QSignalSpy displayUndoInlineSpy(&myPlayList, &MediaPlayList::displayUndoInline);
QSignalSpy displayUndoNotificationSpy(&myPlayList, &MediaPlayList::displayUndoNotification);
QCOMPARE(rowsAboutToBeRemovedSpy.count(), 0);
QCOMPARE(rowsAboutToBeMovedSpy.count(), 0);
......@@ -806,7 +806,7 @@ void MediaPlayListTest::undoReplacePlayListCase()
QCOMPARE(newTrackByNameInListSpy.count(), 0);
QCOMPARE(newEntryInListSpy.count(), 8);
QCOMPARE(currentTrackChangedSpy.count(), 5);
QCOMPARE(displayUndoInlineSpy.count(), 2);
QCOMPARE(displayUndoNotificationSpy.count(), 2);
QCOMPARE(myPlayList.rowCount(), 6);
......
......@@ -568,7 +568,7 @@ void MediaPlayList::clearPlayList(bool prepareUndo)
d->mCurrentTrack = QPersistentModelIndex{};
notifyCurrentTrackChanged();
Q_EMIT displayUndoInline();
Q_EMIT displayUndoNotification();
Q_EMIT tracksCountChanged();
Q_EMIT remainingTracksChanged();
Q_EMIT persistentStateChanged();
......@@ -676,7 +676,7 @@ void MediaPlayList::enqueue(const ElisaUtils::EntryData &newEntry,
{
if (enqueueMode == ElisaUtils::ReplacePlayList) {
if (d->mData.size() == 0) {
Q_EMIT hideUndoInline();
Q_EMIT hideUndoNotification();
}
clearPlayList();
}
......@@ -721,7 +721,7 @@ void MediaPlayList::enqueue(const ElisaUtils::EntryDataList &newEntries,
if (enqueueMode == ElisaUtils::ReplacePlayList) {
if (d->mData.size() == 0) {
Q_EMIT hideUndoInline();
Q_EMIT hideUndoNotification();
}
clearPlayList();
}
......
......@@ -184,9 +184,9 @@ public:
void enqueueRestoredEntries(const QVariantList &newEntries);
Q_SIGNALS:
void displayUndoInline();
void displayUndoNotification();
void hideUndoInline();
void hideUndoNotification();
void newTrackByNameInList(const QVariant &title, const QVariant &artist, const QVariant &album, const QVariant &trackNumber, const QVariant &discNumber);
......
......@@ -87,14 +87,14 @@ FocusScope {
Connections {
target: elisa.mediaPlayList
onDisplayUndoInline: {
onDisplayUndoNotification: {
showPlayListNotification(i18nc("Playlist cleared", "Playlist cleared"), Kirigami.MessageType.Information, undoAction)
}
}
Connections {
target: elisa.mediaPlayList
onHideUndoInline: hideNotification()
onHideUndoNotification: hideNotification()
}
id: topItem
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment