mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-17 16:02:14 -07:00
Remove redundant startNextPicDownload
This commit is contained in:
parent
247e4a526a
commit
614b636176
1 changed files with 4 additions and 4 deletions
|
|
@ -57,6 +57,10 @@ void PictureLoaderWorkerWork::startNextPicDownload()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts another pic download using the next possible url combination for the card.
|
||||||
|
* If all possibilities are exhausted, then concludes the image loading with an empty QImage.
|
||||||
|
*/
|
||||||
void PictureLoaderWorkerWork::picDownloadFailed()
|
void PictureLoaderWorkerWork::picDownloadFailed()
|
||||||
{
|
{
|
||||||
/* Take advantage of short-circuiting here to call the nextUrl until one
|
/* Take advantage of short-circuiting here to call the nextUrl until one
|
||||||
|
|
@ -96,7 +100,6 @@ void PictureLoaderWorkerWork::picDownloadFinished(QNetworkReply *reply)
|
||||||
<< " failed for url " << reply->url().toDisplayString() << " (" << reply->errorString() << ")";
|
<< " failed for url " << reply->url().toDisplayString() << " (" << reply->errorString() << ")";
|
||||||
|
|
||||||
picDownloadFailed();
|
picDownloadFailed();
|
||||||
startNextPicDownload();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
|
|
@ -128,7 +131,6 @@ void PictureLoaderWorkerWork::picDownloadFinished(QNetworkReply *reply)
|
||||||
|
|
||||||
picDownloadFailed();
|
picDownloadFailed();
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
startNextPicDownload();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -170,8 +172,6 @@ void PictureLoaderWorkerWork::picDownloadFinished(QNetworkReply *reply)
|
||||||
<< "PictureLoader: [card: " << cardToDownload.getCard()->getName()
|
<< "PictureLoader: [card: " << cardToDownload.getCard()->getName()
|
||||||
<< " set: " << cardToDownload.getSetName() << "]: Image successfully "
|
<< " set: " << cardToDownload.getSetName() << "]: Image successfully "
|
||||||
<< (isFromCache ? "loaded from cached" : "downloaded from") << " url " << reply->url().toDisplayString();
|
<< (isFromCache ? "loaded from cached" : "downloaded from") << " url " << reply->url().toDisplayString();
|
||||||
} else {
|
|
||||||
startNextPicDownload();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue