mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
rename methods
This commit is contained in:
parent
d5590929b1
commit
592d4e1be5
4 changed files with 8 additions and 7 deletions
|
|
@ -36,8 +36,9 @@ PictureLoader::PictureLoader() : QObject(nullptr)
|
|||
mainWindow->statusBar()->addPermanentWidget(statusBar);
|
||||
}
|
||||
|
||||
connect(worker, &PictureLoaderWorker::imageLoadQueued, statusBar, &PictureLoaderStatusBar::addQueuedImageLoad);
|
||||
connect(worker, &PictureLoaderWorker::requestSucceeded, statusBar, &PictureLoaderStatusBar::addSuccessfulImageLoad);
|
||||
connect(worker, &PictureLoaderWorker::imageRequestQueued, statusBar, &PictureLoaderStatusBar::addQueuedImageLoad);
|
||||
connect(worker, &PictureLoaderWorker::imageRequestSucceeded, statusBar,
|
||||
&PictureLoaderStatusBar::addSuccessfulImageLoad);
|
||||
}
|
||||
|
||||
PictureLoader::~PictureLoader()
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ void PictureLoaderWorker::queueRequest(const QUrl &url, PictureLoaderWorkerWork
|
|||
makeRequest(url, worker);
|
||||
} else {
|
||||
requestLoadQueue.append(qMakePair(url, worker));
|
||||
emit imageLoadQueued(url, worker->cardToDownload.getCard(), worker->cardToDownload.getSetName());
|
||||
emit imageRequestQueued(url, worker->cardToDownload.getCard(), worker->cardToDownload.getSetName());
|
||||
processQueuedRequests();
|
||||
}
|
||||
}
|
||||
|
|
@ -82,7 +82,7 @@ QNetworkReply *PictureLoaderWorker::makeRequest(const QUrl &url, PictureLoaderWo
|
|||
// Check for cached redirects
|
||||
QUrl cachedRedirect = getCachedRedirect(url);
|
||||
if (!cachedRedirect.isEmpty()) {
|
||||
emit requestSucceeded(url);
|
||||
emit imageRequestSucceeded(url);
|
||||
return makeRequest(cachedRedirect, worker);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ private slots:
|
|||
signals:
|
||||
void imageLoadEnqueued(const CardInfoPtr &card);
|
||||
void imageLoaded(CardInfoPtr card, const QImage &image);
|
||||
void imageLoadQueued(const QUrl &url, const CardInfoPtr &card, const QString &setName);
|
||||
void requestSucceeded(const QUrl &url);
|
||||
void imageRequestQueued(const QUrl &url, const CardInfoPtr &card, const QString &setName);
|
||||
void imageRequestSucceeded(const QUrl &url);
|
||||
};
|
||||
|
||||
#endif // PICTURE_LOADER_WORKER_H
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ PictureLoaderWorkerWork::PictureLoaderWorkerWork(const PictureLoaderWorker *work
|
|||
connect(this, &PictureLoaderWorkerWork::urlRedirected, worker, &PictureLoaderWorker::cacheRedirect);
|
||||
connect(this, &PictureLoaderWorkerWork::cachedUrlInvalidated, worker, &PictureLoaderWorker::removedCachedUrl);
|
||||
connect(this, &PictureLoaderWorkerWork::imageLoaded, worker, &PictureLoaderWorker::handleImageLoaded);
|
||||
connect(this, &PictureLoaderWorkerWork::requestSucceeded, worker, &PictureLoaderWorker::requestSucceeded);
|
||||
connect(this, &PictureLoaderWorkerWork::requestSucceeded, worker, &PictureLoaderWorker::imageRequestSucceeded);
|
||||
|
||||
// Hook up signals to settings
|
||||
connect(&SettingsCache::instance(), SIGNAL(picDownloadChanged()), this, SLOT(picDownloadChanged()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue