Remove unused collection playlist container type

This commit is contained in:
Jonas Kvinge 2020-08-12 21:33:38 +02:00
parent ba89e0f4e3
commit f84128ecbd
5 changed files with 1 additions and 12 deletions

View File

@ -33,7 +33,6 @@ class CollectionItem : public SimpleTreeItem<CollectionItem> {
Type_Divider,
Type_Container,
Type_Song,
Type_PlaylistContainer,
Type_LoadingIndicator,
};

View File

@ -97,8 +97,6 @@ CollectionModel::CollectionModel(CollectionBackend *backend, Application *app, Q
total_album_count_(0),
artist_icon_(IconLoader::Load("folder-sound")),
album_icon_(IconLoader::Load("cdcase")),
playlists_dir_icon_(IconLoader::Load("folder-sound")),
playlist_icon_(IconLoader::Load("albums")),
init_task_id_(-1),
use_pretty_covers_(false),
show_dividers_(true),
@ -695,8 +693,6 @@ QVariant CollectionModel::data(const CollectionItem *item, const int role) const
case Qt::DecorationRole:
switch (item->type) {
case CollectionItem::Type_PlaylistContainer:
return playlists_dir_icon_;
case CollectionItem::Type_Container:
switch (container_type) {
case GroupBy_Album:

View File

@ -280,8 +280,6 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
QIcon album_icon_;
// Used as a generic icon to show when no cover art is found, fixed to the same size as the artwork (32x32)
QPixmap no_cover_icon_;
QIcon playlists_dir_icon_;
QIcon playlist_icon_;
static QNetworkDiskCache *sIconCache;

View File

@ -62,8 +62,7 @@ ContextAlbumsModel::ContextAlbumsModel(CollectionBackend *backend, Application *
SimpleTreeModel<CollectionItem>(new CollectionItem(this), parent),
backend_(backend),
app_(app),
album_icon_(IconLoader::Load("cdcase")),
playlists_dir_icon_(IconLoader::Load("folder-sound")) {
album_icon_(IconLoader::Load("cdcase")) {
root_->lazy_loaded = true;
@ -195,8 +194,6 @@ QVariant ContextAlbumsModel::data(const CollectionItem *item, int role) const {
case Qt::DecorationRole:
switch (item->type) {
case CollectionItem::Type_PlaylistContainer:
return playlists_dir_icon_;
case CollectionItem::Type_Container:
if (item->type == CollectionItem::Type_Container && item->container_level == 0) { return album_icon_; }
break;

View File

@ -120,7 +120,6 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
QMap<int, CollectionItem*> song_nodes_;
QIcon album_icon_;
QPixmap no_cover_icon_;
QIcon playlists_dir_icon_;
AlbumCoverLoaderOptions cover_loader_options_;
typedef QPair<CollectionItem*, QString> ItemAndCacheKey;
QMap<quint64, ItemAndCacheKey> pending_art_;