Commit 6254e03f authored by Matthieu Gallien's avatar Matthieu Gallien 🎵

fix failing test in autotests/mediaplaylisttest.cpp

parent caf86cbd
......@@ -4095,7 +4095,7 @@ void MediaPlayListTest::testSetData()
QCOMPARE(myPlayList.data(myPlayList.index(1, 0), MediaPlayList::ColumnsRoles::IsPlayingRole).toBool(), false);
QCOMPARE(myPlayList.data(myPlayList.index(2, 0), MediaPlayList::ColumnsRoles::IsPlayingRole).toBool(), true);
QCOMPARE(myPlayList.setData(myPlayList.index(2, 0), true, MediaPlayList::ColumnsRoles::TitleRole), false);
QCOMPARE(myPlayList.setData(myPlayList.index(2, 0), true, MediaPlayList::ColumnsRoles::SecondaryTextRole), false);
QCOMPARE(rowsAboutToBeRemovedSpy.count(), 0);
QCOMPARE(rowsAboutToBeMovedSpy.count(), 0);
......
......@@ -220,8 +220,7 @@ bool MediaPlayList::setData(const QModelIndex &index, const QVariant &value, int
return modelModified;
}
if ((role != ColumnsRoles::TitleRole && role != ColumnsRoles::ArtistRole) &&
(role < ColumnsRoles::IsValidRole || role > ColumnsRoles::IsPlayingRole)) {
if (role < ColumnsRoles::IsValidRole || role > ColumnsRoles::IsPlayingRole) {
return modelModified;
}
......
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