Rename method

This commit is contained in:
RickyRister 2025-07-04 22:51:02 -07:00
parent 0ce1281eca
commit db22ad5ce0
3 changed files with 5 additions and 6 deletions

View file

@ -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);

View file

@ -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);

View file

@ -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()));