mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 14:32:15 -07:00
emit cachedImageHit first
This commit is contained in:
parent
c103580f8d
commit
935a3a0308
1 changed files with 2 additions and 3 deletions
|
|
@ -98,12 +98,11 @@ void PictureLoaderWorkerWork::handleNetworkReply(QNetworkReply *reply)
|
||||||
if (reply->error()) {
|
if (reply->error()) {
|
||||||
handleFailedReply(reply);
|
handleFailedReply(reply);
|
||||||
} else {
|
} else {
|
||||||
handleSuccessfulReply(reply);
|
|
||||||
|
|
||||||
// If we hit a cached image, we get to make another request for free.
|
|
||||||
if (reply->attribute(QNetworkRequest::SourceIsFromCacheAttribute).toBool()) {
|
if (reply->attribute(QNetworkRequest::SourceIsFromCacheAttribute).toBool()) {
|
||||||
emit cachedImageHit();
|
emit cachedImageHit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleSuccessfulReply(reply);
|
||||||
}
|
}
|
||||||
|
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue