Use one instance of NetworkAccessManager

This commit is contained in:
Jonas Kvinge
2023-04-21 20:20:53 +02:00
parent bee6b7f946
commit 7fc5aef553
53 changed files with 270 additions and 311 deletions

View File

@@ -132,7 +132,7 @@ void AlbumCoverChoiceController::Init(Application *app) {
app_ = app;
cover_fetcher_ = new AlbumCoverFetcher(app_->cover_providers(), this);
cover_fetcher_ = new AlbumCoverFetcher(app_->cover_providers(), app->network(), this);
cover_searcher_ = new AlbumCoverSearcher(QIcon(":/pictures/cdcase.png"), app, this);
cover_searcher_->Init(cover_fetcher_);
@@ -322,7 +322,7 @@ QUrl AlbumCoverChoiceController::LoadCoverFromURL(Song *song) {
AlbumCoverImageResultPtr AlbumCoverChoiceController::LoadImageFromURL() {
if (!cover_from_url_dialog_) { cover_from_url_dialog_ = new CoverFromURLDialog(this); }
if (!cover_from_url_dialog_) { cover_from_url_dialog_ = new CoverFromURLDialog(app_->network(), this); }
return cover_from_url_dialog_->Exec();