From a2df43c830db5995a4c38a5f36059a107909f099 Mon Sep 17 00:00:00 2001 From: Ignas Kaziukenas Date: Mon, 27 Oct 2014 15:49:11 +0200 Subject: [PATCH] Reverted changes amde to groupby_performer --- src/globalsearch/globalsearchmodel.cpp | 4 ++-- src/library/groupbydialog.cpp | 4 ++-- src/library/librarymodel.cpp | 30 +++++++++++++------------- src/library/librarymodel.h | 4 ++-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/globalsearch/globalsearchmodel.cpp b/src/globalsearch/globalsearchmodel.cpp index b4177cfbf..d10df792a 100644 --- a/src/globalsearch/globalsearchmodel.cpp +++ b/src/globalsearch/globalsearchmodel.cpp @@ -128,8 +128,8 @@ QStandardItem* GlobalSearchModel::BuildContainers(const Song& s, case LibraryModel::GroupBy_Composer: display_text = s.composer(); - // case LibraryModel::GroupBy_Performer: - // display_text = s.performer(); + case LibraryModel::GroupBy_Performer: + display_text = s.performer(); case LibraryModel::GroupBy_Disc: display_text = s.disc(); case LibraryModel::GroupBy_Grouping: diff --git a/src/library/groupbydialog.cpp b/src/library/groupbydialog.cpp index 7d411259e..1b3e84571 100644 --- a/src/library/groupbydialog.cpp +++ b/src/library/groupbydialog.cpp @@ -78,9 +78,9 @@ GroupByDialog::GroupByDialog(QWidget* parent) p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Year, 7)); p_->mapping_.insert(Mapping(LibraryModel::GroupBy_YearAlbum, 8)); p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Bitrate, 9)); - // p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Performer, 10)); p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Disc, 10)); - p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Grouping, 11)); + p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Performer, 11)); + p_->mapping_.insert(Mapping(LibraryModel::GroupBy_Grouping, 12)); connect(ui_->button_box->button(QDialogButtonBox::Reset), SIGNAL(clicked()), SLOT(Reset())); diff --git a/src/library/librarymodel.cpp b/src/library/librarymodel.cpp index 076a04532..e0d44d4d6 100644 --- a/src/library/librarymodel.cpp +++ b/src/library/librarymodel.cpp @@ -203,9 +203,9 @@ void LibraryModel::SongsDiscovered(const SongList& songs) { case GroupBy_Composer: key = song.composer(); break; - // case GroupBy_Performer: - // key = song.performer(); - // break; + case GroupBy_Performer: + key = song.performer(); + break; case GroupBy_Disc: key = song.disc(); break; @@ -298,7 +298,7 @@ QString LibraryModel::DividerKey(GroupBy type, LibraryItem* item) const { case GroupBy_Album: case GroupBy_Artist: case GroupBy_Composer: - // case GroupBy_Performer: + case GroupBy_Performer: case GroupBy_Disc: case GroupBy_Grouping: case GroupBy_Genre: @@ -337,7 +337,7 @@ QString LibraryModel::DividerDisplayText(GroupBy type, case GroupBy_Album: case GroupBy_Artist: case GroupBy_Composer: - // case GroupBy_Performer: + case GroupBy_Performer: case GroupBy_Disc: case GroupBy_Grouping: case GroupBy_Genre: @@ -785,9 +785,9 @@ void LibraryModel::InitQuery(GroupBy type, LibraryQuery* q) { case GroupBy_Composer: q->SetColumnSpec("DISTINCT composer"); break; - // case GroupBy_Performer: - // q->SetColumnSpec("DISTINCT performer"); - // break; + case GroupBy_Performer: + q->SetColumnSpec("DISTINCT performer"); + break; case GroupBy_Disc: q->SetColumnSpec("DISTINCT disc"); break; @@ -846,9 +846,9 @@ void LibraryModel::FilterQuery(GroupBy type, LibraryItem* item, case GroupBy_Composer: q->AddWhere("composer", item->key); break; - // case GroupBy_Performer: - // q->AddWhere("performer", item->key); - // break; + case GroupBy_Performer: + q->AddWhere("performer", item->key); + break; case GroupBy_Disc: q->AddWhere("disc", item->key); break; @@ -926,7 +926,7 @@ LibraryItem* LibraryModel::ItemFromQuery(GroupBy type, bool signal, break; case GroupBy_Composer: - // case GroupBy_Performer: + case GroupBy_Performer: case GroupBy_Disc: case GroupBy_Grouping: case GroupBy_Genre: @@ -991,9 +991,9 @@ LibraryItem* LibraryModel::ItemFromSong(GroupBy type, bool signal, case GroupBy_Composer: item->key = s.composer(); - // case GroupBy_Performer: - // item->key = s.performer(); - case GroupBy_Disc: + case GroupBy_Performer: + item->key = s.performer(); + case GroupBy_Disc: item->key = s.disc(); case GroupBy_Grouping: item->key = s.grouping(); diff --git a/src/library/librarymodel.h b/src/library/librarymodel.h index d64876482..e77a4c55e 100644 --- a/src/library/librarymodel.h +++ b/src/library/librarymodel.h @@ -81,10 +81,10 @@ class LibraryModel : public SimpleTreeModel { GroupBy_Genre = 6, GroupBy_AlbumArtist = 7, GroupBy_FileType = 8, - // GroupBy_Performer = 9, - GroupBy_Disc = 9, + GroupBy_Performer = 9, GroupBy_Grouping = 10, GroupBy_Bitrate = 11, + GroupBy_Disc = 12, }; struct Grouping {