pdfworker: Renderer copy constructor missed max mem field

This commit is contained in:
Albert S. 2019-08-12 10:26:16 +02:00
parent 4a8d994358
commit 0528e9067a

View File

@ -33,6 +33,7 @@ struct Renderer
{ {
this->scaleX = o.scaleX; this->scaleX = o.scaleX;
this->scaleY = o.scaleY; this->scaleY = o.scaleY;
this->maxTotalPreviewImageMemUsage = o.maxTotalPreviewImageMemUsage;
} }
~Renderer() ~Renderer()
@ -105,6 +106,5 @@ QFuture<PdfPreview> PdfWorker::generatePreviews(const QVector<SearchResult> path
QSettings setting; QSettings setting;
qsizetype maxPreviewImageMemUsage = setting.value("maxpreviewimagesmemory", 1024 * 1024 * 1024).toLongLong(); qsizetype maxPreviewImageMemUsage = setting.value("maxpreviewimagesmemory", 1024 * 1024 * 1024).toLongLong();
return QtConcurrent::mapped(previews, Renderer(scaleX, scaleY, maxPreviewImageMemUsage)); return QtConcurrent::mapped(previews, Renderer(scaleX, scaleY, maxPreviewImageMemUsage));
} }