Add destructor for pdfworker renderer
This commit is contained in:
parent
4c8d201f81
commit
78fb075739
@ -21,6 +21,12 @@ struct Renderer
|
|||||||
this->scaleX = scaleX;
|
this->scaleX = scaleX;
|
||||||
this->scaleY = scaleY;
|
this->scaleY = scaleY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~Renderer()
|
||||||
|
{
|
||||||
|
qDeleteAll(documentcache);
|
||||||
|
}
|
||||||
|
|
||||||
Poppler::Document *document(QString path)
|
Poppler::Document *document(QString path)
|
||||||
{
|
{
|
||||||
if(documentcache.contains(path))
|
if(documentcache.contains(path))
|
||||||
@ -29,6 +35,7 @@ struct Renderer
|
|||||||
Poppler::Document *result = Poppler::Document::load(path);
|
Poppler::Document *result = Poppler::Document::load(path);
|
||||||
if(result == nullptr)
|
if(result == nullptr)
|
||||||
{
|
{
|
||||||
|
// TODO: some kind of user feedback would be nicec
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
result->setRenderHint(Poppler::Document::TextAntialiasing);
|
result->setRenderHint(Poppler::Document::TextAntialiasing);
|
||||||
|
Loading…
Reference in New Issue
Block a user