Change pixmap cache limit
This commit is contained in:
parent
779d5ff7b6
commit
e0fed07b10
|
@ -70,7 +70,6 @@ using std::placeholders::_2;
|
||||||
|
|
||||||
const char *CollectionModel::kSavedGroupingsSettingsGroup = "SavedGroupings";
|
const char *CollectionModel::kSavedGroupingsSettingsGroup = "SavedGroupings";
|
||||||
const int CollectionModel::kPrettyCoverSize = 32;
|
const int CollectionModel::kPrettyCoverSize = 32;
|
||||||
const qint64 CollectionModel::kIconCacheSize = 100000000; //~100MB
|
|
||||||
|
|
||||||
static bool IsArtistGroupBy(const CollectionModel::GroupBy by) {
|
static bool IsArtistGroupBy(const CollectionModel::GroupBy by) {
|
||||||
return by == CollectionModel::GroupBy_Artist || by == CollectionModel::GroupBy_AlbumArtist;
|
return by == CollectionModel::GroupBy_Artist || by == CollectionModel::GroupBy_AlbumArtist;
|
||||||
|
@ -126,7 +125,7 @@ CollectionModel::CollectionModel(CollectionBackend *backend, Application *app, Q
|
||||||
backend_->UpdateTotalArtistCountAsync();
|
backend_->UpdateTotalArtistCountAsync();
|
||||||
backend_->UpdateTotalAlbumCountAsync();
|
backend_->UpdateTotalAlbumCountAsync();
|
||||||
|
|
||||||
QPixmapCache::setCacheLimit(61440);
|
QPixmapCache::setCacheLimit(QPixmapCache::cacheLimit() * 8);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,6 @@ class CollectionModel : public SimpleTreeModel<CollectionItem> {
|
||||||
static const char *kSavedGroupingsSettingsGroup;
|
static const char *kSavedGroupingsSettingsGroup;
|
||||||
|
|
||||||
static const int kPrettyCoverSize;
|
static const int kPrettyCoverSize;
|
||||||
static const qint64 kIconCacheSize;
|
|
||||||
|
|
||||||
enum Role {
|
enum Role {
|
||||||
Role_Type = Qt::UserRole + 1,
|
Role_Type = Qt::UserRole + 1,
|
||||||
|
|
Loading…
Reference in New Issue