Commit 7466945e authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Use the QImageReader::read variant that gives you an image even if it thinks it failed

BUGS: 441554
parent fb7404ac
Pipeline #77933 skipped
......@@ -137,7 +137,12 @@ QImage kpDocument::getPixmapFromFile(const QUrl &url, bool suppressDoesntExistDi
reader.setAutoTransform(true);
reader.setDecideFormatFromContent(true);
QImage image = reader.read();
// Do *NOT* convert to
// QImage image = reader.read();
// this variant is more lenient on errors and we may get something that we would not otherwise
// e.g. image from https://bugs.kde.org/show_bug.cgi?id=441554
QImage image;
reader.read(&image);
if (image.isNull ())
{
......
Markdown is supported
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