Change pixmap cache limit

This commit is contained in:
Jonas Kvinge 2019-11-19 21:03:06 +01:00
parent 779d5ff7b6
commit e0fed07b10
2 changed files with 1 additions and 3 deletions

View File

@ -70,7 +70,6 @@ using std::placeholders::_2;
const char *CollectionModel::kSavedGroupingsSettingsGroup = "SavedGroupings";
const int CollectionModel::kPrettyCoverSize = 32;
const qint64 CollectionModel::kIconCacheSize = 100000000; //~100MB
static bool IsArtistGroupBy(const CollectionModel::GroupBy by) {
return by == CollectionModel::GroupBy_Artist || by == CollectionModel::GroupBy_AlbumArtist;
@ -126,7 +125,7 @@ CollectionModel::CollectionModel(CollectionBackend *backend, Application *app, Q
backend_->UpdateTotalArtistCountAsync();
backend_->UpdateTotalAlbumCountAsync();
QPixmapCache::setCacheLimit(61440);
QPixmapCache::setCacheLimit(QPixmapCache::cacheLimit() * 8);
}

View File

@ -70,7 +70,6 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
static const char *kSavedGroupingsSettingsGroup;
static const int kPrettyCoverSize;
static const qint64 kIconCacheSize;
enum Role {
Role_Type = Qt::UserRole + 1,