Remove unused collection playlist container type
This commit is contained in:
@@ -33,7 +33,6 @@ class CollectionItem : public SimpleTreeItem<CollectionItem> {
|
|||||||
Type_Divider,
|
Type_Divider,
|
||||||
Type_Container,
|
Type_Container,
|
||||||
Type_Song,
|
Type_Song,
|
||||||
Type_PlaylistContainer,
|
|
||||||
Type_LoadingIndicator,
|
Type_LoadingIndicator,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -97,8 +97,6 @@ CollectionModel::CollectionModel(CollectionBackend *backend, Application *app, Q
|
|||||||
total_album_count_(0),
|
total_album_count_(0),
|
||||||
artist_icon_(IconLoader::Load("folder-sound")),
|
artist_icon_(IconLoader::Load("folder-sound")),
|
||||||
album_icon_(IconLoader::Load("cdcase")),
|
album_icon_(IconLoader::Load("cdcase")),
|
||||||
playlists_dir_icon_(IconLoader::Load("folder-sound")),
|
|
||||||
playlist_icon_(IconLoader::Load("albums")),
|
|
||||||
init_task_id_(-1),
|
init_task_id_(-1),
|
||||||
use_pretty_covers_(false),
|
use_pretty_covers_(false),
|
||||||
show_dividers_(true),
|
show_dividers_(true),
|
||||||
@@ -695,8 +693,6 @@ QVariant CollectionModel::data(const CollectionItem *item, const int role) const
|
|||||||
|
|
||||||
case Qt::DecorationRole:
|
case Qt::DecorationRole:
|
||||||
switch (item->type) {
|
switch (item->type) {
|
||||||
case CollectionItem::Type_PlaylistContainer:
|
|
||||||
return playlists_dir_icon_;
|
|
||||||
case CollectionItem::Type_Container:
|
case CollectionItem::Type_Container:
|
||||||
switch (container_type) {
|
switch (container_type) {
|
||||||
case GroupBy_Album:
|
case GroupBy_Album:
|
||||||
|
|||||||
@@ -280,8 +280,6 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
|
|||||||
QIcon album_icon_;
|
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)
|
// 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_;
|
QPixmap no_cover_icon_;
|
||||||
QIcon playlists_dir_icon_;
|
|
||||||
QIcon playlist_icon_;
|
|
||||||
|
|
||||||
static QNetworkDiskCache *sIconCache;
|
static QNetworkDiskCache *sIconCache;
|
||||||
|
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ ContextAlbumsModel::ContextAlbumsModel(CollectionBackend *backend, Application *
|
|||||||
SimpleTreeModel<CollectionItem>(new CollectionItem(this), parent),
|
SimpleTreeModel<CollectionItem>(new CollectionItem(this), parent),
|
||||||
backend_(backend),
|
backend_(backend),
|
||||||
app_(app),
|
app_(app),
|
||||||
album_icon_(IconLoader::Load("cdcase")),
|
album_icon_(IconLoader::Load("cdcase")) {
|
||||||
playlists_dir_icon_(IconLoader::Load("folder-sound")) {
|
|
||||||
|
|
||||||
root_->lazy_loaded = true;
|
root_->lazy_loaded = true;
|
||||||
|
|
||||||
@@ -195,8 +194,6 @@ QVariant ContextAlbumsModel::data(const CollectionItem *item, int role) const {
|
|||||||
|
|
||||||
case Qt::DecorationRole:
|
case Qt::DecorationRole:
|
||||||
switch (item->type) {
|
switch (item->type) {
|
||||||
case CollectionItem::Type_PlaylistContainer:
|
|
||||||
return playlists_dir_icon_;
|
|
||||||
case CollectionItem::Type_Container:
|
case CollectionItem::Type_Container:
|
||||||
if (item->type == CollectionItem::Type_Container && item->container_level == 0) { return album_icon_; }
|
if (item->type == CollectionItem::Type_Container && item->container_level == 0) { return album_icon_; }
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ class ContextAlbumsModel : public SimpleTreeModel<CollectionItem> {
|
|||||||
QMap<int, CollectionItem*> song_nodes_;
|
QMap<int, CollectionItem*> song_nodes_;
|
||||||
QIcon album_icon_;
|
QIcon album_icon_;
|
||||||
QPixmap no_cover_icon_;
|
QPixmap no_cover_icon_;
|
||||||
QIcon playlists_dir_icon_;
|
|
||||||
AlbumCoverLoaderOptions cover_loader_options_;
|
AlbumCoverLoaderOptions cover_loader_options_;
|
||||||
typedef QPair<CollectionItem*, QString> ItemAndCacheKey;
|
typedef QPair<CollectionItem*, QString> ItemAndCacheKey;
|
||||||
QMap<quint64, ItemAndCacheKey> pending_art_;
|
QMap<quint64, ItemAndCacheKey> pending_art_;
|
||||||
|
|||||||
Reference in New Issue
Block a user