Commit 8b588c6f authored by Peng Liu's avatar Peng Liu
Browse files

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

parents 4bb1d28a 6502a182
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment