Move ClearDiskCache connect

This commit is contained in:
Jonas Kvinge 2020-05-16 19:35:25 +02:00
parent bfa9a1eb8a
commit 972076edab
1 changed files with 1 additions and 4 deletions

View File

@ -126,6 +126,7 @@ CollectionModel::CollectionModel(CollectionBackend *backend, Application *app, Q
if (app_ && !sIconCache) {
sIconCache = new QNetworkDiskCache(this);
sIconCache->setCacheDirectory(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/" + kPixmapDiskCacheDir);
connect(app_, SIGNAL(ClearPixmapDiskCache()), SLOT(ClearDiskCache()));
}
connect(backend_, SIGNAL(SongsDiscovered(SongList)), SLOT(SongsDiscovered(SongList)));
@ -140,10 +141,6 @@ CollectionModel::CollectionModel(CollectionBackend *backend, Application *app, Q
backend_->UpdateTotalArtistCountAsync();
backend_->UpdateTotalAlbumCountAsync();
if (app_) {
connect(app_, SIGNAL(ClearPixmapDiskCache()), SLOT(ClearDiskCache()));
}
ReloadSettings();
}