Merge branch 'ctrlaltca-pr256' into handle-PNGs-2

This commit is contained in:
Peng Liu 2014-08-06 04:55:27 -04:00
commit 8b588c6fd3

View file

@ -132,11 +132,12 @@ void PictureLoader::processLoadQueue()
<< _picsPath + "/downloadedPics/" + ptl.getSetName() + "/" + ptl.getCard()->getCorrectedName() + ".full";
QImage image;
QImageReader imgReader;
imgReader.setDecideFormatFromContent(true);
bool found = false;
//Iterates through the list of paths, searching for images with the desired name with any QImageReader-supported extension
for (int i = 0; i < picsPaths.length() && !found; i ++) {
QImageReader imgReader;
imgReader.setFileName(picsPaths.at(i));
if (imgReader.read(&image)) {
emit imageLoaded(ptl.getCard(), image);