qDebug()<<"Picture NOT found, download failed, moving to next set (newset: "<<cardBeingDownloaded.getSetName()<<" card: "<<cardBeingDownloaded.getCard()->getCorrectedName()<<")";
mutex.lock();
loadQueue.prepend(cardBeingDownloaded);
mutex.unlock();
emitstartLoadQueue();
}else{
qDebug()<<"Picture NOT found, download failed, no more sets to try: BAILING OUT (oldset: "<<cardBeingDownloaded.getSetName()<<" card: "<<cardBeingDownloaded.getCard()->getCorrectedName()<<")";
constQByteArray&picData=reply->peek(reply->size());//peek is used to keep the data in the buffer for use by QImageReader
if(imageIsBlackListed(picData))
{
qDebug()<<"Picture downloaded, but blacklisted, will consider it as not found";
picDownloadFailed();
reply->deleteLater();
startNextPicDownload();
return;
}
QImagetestImage;
QImageReaderimgReader;
imgReader.setDecideFormatFromContent(true);
imgReader.setDevice(reply);
QStringextension="."+imgReader.format();//the format is determined prior to reading the QImageReader data into a QImage object, as that wipes the QImageReader buffer