Commit f31152d3 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Fix loading some png files inside zip comicbook files

BUGS: 436086
parent be1f0de1
Pipeline #61690 passed with stage
in 25 minutes and 46 seconds
......@@ -9,6 +9,7 @@
#include "document.h"
#include <QBuffer>
#include <QImage>
#include <QImageReader>
#include <QScopedPointer>
......@@ -235,7 +236,14 @@ QImage Document::pageImage(int page) const
const KArchiveFile *entry = static_cast<const KArchiveFile *>(mArchiveDir->entry(mPageMap[page]));
if (entry) {
std::unique_ptr<QIODevice> dev(entry->createDevice());
QImageReader reader(dev.get());
// This could simply be
// QImageReader reader(dev.get());
// but due to and
// it can not, so it will have to be like this at least until Qt6
// Test with (it's a cbz with a png inside)
QBuffer b;
QImageReader reader(&b);
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