From db22ad5ce023920ca2cb8ac1713f2e61f6dc6310 Mon Sep 17 00:00:00 2001 From: RickyRister Date: Fri, 4 Jul 2025 22:51:02 -0700 Subject: [PATCH] Rename method --- .../src/client/ui/picture_loader/picture_loader_worker.cpp | 7 +++---- .../src/client/ui/picture_loader/picture_loader_worker.h | 2 +- .../ui/picture_loader/picture_loader_worker_work.cpp | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cockatrice/src/client/ui/picture_loader/picture_loader_worker.cpp b/cockatrice/src/client/ui/picture_loader/picture_loader_worker.cpp index 5bab2b265..c7378fb27 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_loader_worker.cpp +++ b/cockatrice/src/client/ui/picture_loader/picture_loader_worker.cpp @@ -148,7 +148,7 @@ void PictureLoaderWorker::handleImageLoadEnqueued(const CardInfoPtr &card) // try to load image from local first QImage image = localLoader->tryLoad(card); if (!image.isNull()) { - imageLoadedSuccessfully(card, image); + handleImageLoaded(card, image); } else { // queue up to load image from remote only after local loading failed new PictureLoaderWorkerWork(this, card); @@ -156,10 +156,9 @@ void PictureLoaderWorker::handleImageLoadEnqueued(const CardInfoPtr &card) } /** - * Called when image loading is done - * Contrary to the name, this is called on both success and failure. Failures are indicated by an empty QImage. + * Called when image loading is done. Failures are indicated by an empty QImage. */ -void PictureLoaderWorker::imageLoadedSuccessfully(const CardInfoPtr &card, const QImage &image) +void PictureLoaderWorker::handleImageLoaded(const CardInfoPtr &card, const QImage &image) { currentlyLoading.remove(card); emit imageLoaded(card, image); diff --git a/cockatrice/src/client/ui/picture_loader/picture_loader_worker.h b/cockatrice/src/client/ui/picture_loader/picture_loader_worker.h index 6a159c167..f5b0a3507 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_loader_worker.h +++ b/cockatrice/src/client/ui/picture_loader/picture_loader_worker.h @@ -39,7 +39,7 @@ public slots: QNetworkReply *makeRequest(const QUrl &url, PictureLoaderWorkerWork *workThread); void processQueuedRequests(); bool processSingleRequest(); - void imageLoadedSuccessfully(const CardInfoPtr &card, const QImage &image); + void handleImageLoaded(const CardInfoPtr &card, const QImage &image); void cacheRedirect(const QUrl &originalUrl, const QUrl &redirectUrl); void removedCachedUrl(const QUrl &url); diff --git a/cockatrice/src/client/ui/picture_loader/picture_loader_worker_work.cpp b/cockatrice/src/client/ui/picture_loader/picture_loader_worker_work.cpp index 712f68dc1..38c8f14cb 100644 --- a/cockatrice/src/client/ui/picture_loader/picture_loader_worker_work.cpp +++ b/cockatrice/src/client/ui/picture_loader/picture_loader_worker_work.cpp @@ -22,7 +22,7 @@ PictureLoaderWorkerWork::PictureLoaderWorkerWork(const PictureLoaderWorker *work connect(this, &PictureLoaderWorkerWork::requestImageDownload, worker, &PictureLoaderWorker::queueRequest); connect(this, &PictureLoaderWorkerWork::urlRedirected, worker, &PictureLoaderWorker::cacheRedirect); connect(this, &PictureLoaderWorkerWork::cachedUrlInvalidated, worker, &PictureLoaderWorker::removedCachedUrl); - connect(this, &PictureLoaderWorkerWork::imageLoaded, worker, &PictureLoaderWorker::imageLoadedSuccessfully); + connect(this, &PictureLoaderWorkerWork::imageLoaded, worker, &PictureLoaderWorker::handleImageLoaded); // Hook up signals to settings connect(&SettingsCache::instance(), SIGNAL(picDownloadChanged()), this, SLOT(picDownloadChanged()));