From 7f5a5118a1d68ca294cdccfec8a49469e8ad2925 Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 18 Feb 2018 06:10:13 +0100 Subject: Add roles to album item in CollectionDatesView Needed for Musicbrainz search. --- collectiondatesview.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/collectiondatesview.cpp b/collectiondatesview.cpp index f93685b..17856c7 100644 --- a/collectiondatesview.cpp +++ b/collectiondatesview.cpp @@ -51,6 +51,9 @@ void CollectionDatesView::populate(){ QString albumText = QString("%1 - %2").arg(q1.value(3).toString()).arg(q1.value(1).toString()); albumItem->setText(albumText); albumItem->setIcon(albumIcon); + albumItem->setData(Album, TypeRole); + albumItem->setData(q1.value(3), ArtistRole); + albumItem->setData(q1.value(1), AlbumRole); ymItem->appendRow(albumItem); songQ.bindValue(":id", q1.value(0)); songQ.exec(); -- cgit v1.2.3-70-g09d2