Commit 3e3b602a authored by Pierre Ducroquet's avatar Pierre Ducroquet 🛩
Browse files

Fix a serious memory leak in the Okular Odt plugin

I don't understand how this leak survived that long.
The painter variable is unused, and the allocated QPixmap is
erased the next line...

BUG 391223
parent 77f55ea9
......@@ -47,7 +47,7 @@
OkularOdtGenerator::OkularOdtGenerator( QObject *parent, const QVariantList &args )
: Okular::Generator( parent, args )
{
m_doc = 0;
m_doc = nullptr;
setFeature( TextExtraction );
}
......@@ -224,9 +224,6 @@ void OkularOdtGenerator::generatePixmap( Okular::PixmapRequest *request )
KWPage page = pageManager->page(request->pageNumber()+1);
pix = new QPixmap(request->width(), request->height());
QPainter painter(pix);
QSize rSize(request->width(), request->height());
pix = new QPixmap();
......
......@@ -48,7 +48,7 @@ public:
bool canGenerateTextPage() const override;
protected:
bool doCloseDocument();
bool doCloseDocument() override;
Okular::TextPage* textPage( Okular::Page *page );
private:
......
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