Commit 9b5286b3 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Open the temporary file again, it might be closed.

And set the suffix in the QImage::load() code so we can help
QImage a bit finding the right format.
parent 7f8670d8
......@@ -143,8 +143,11 @@ QImage KoImageData::image() const
if (d->dataStoreState == KoImageDataPrivate::StateNotLoaded) {
// load image
if (d->temporaryFile) {
if (d->errorCode == Success && !d->image.load(d->temporaryFile->fileName())) {
bool r = d->temporaryFile->open();
if (!r) {
d->errorCode = OpenFailed;
else if (d->errorCode == Success && !d->image.load(d->temporaryFile->fileName(), d->suffix.toLatin1())) {
d->errorCode = OpenFailed;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment