From ae178e34e52c4a2f576dec7cf39850fa4040915f Mon Sep 17 00:00:00 2001 From: Albert S Date: Mon, 12 Aug 2019 10:26:16 +0200 Subject: [PATCH] pdfworker: Renderer copy constructor missed max mem field --- gui/pdfworker.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gui/pdfworker.cpp b/gui/pdfworker.cpp index 390609d..4364815 100644 --- a/gui/pdfworker.cpp +++ b/gui/pdfworker.cpp @@ -26,15 +26,15 @@ struct Renderer this->scaleX = scaleX; this->scaleY = scaleY; this->maxTotalPreviewImageMemUsage = maxPreviewImageMemUsage; - } /*we need this one because std::atomic has none, but this is only a functor for concurrentmap, thus, it's ok for it to be half-broken*/ - Renderer(const Renderer &o) + Renderer(const Renderer &o) { this->scaleX = o.scaleX; this->scaleY = o.scaleY; + this->maxTotalPreviewImageMemUsage = o.maxTotalPreviewImageMemUsage; } ~Renderer() @@ -114,7 +114,6 @@ QFuture PdfWorker::generatePreviews(const QVector path QSettings setting; qsizetype maxPreviewImageMemUsage = setting.value("maxpreviewimagesmemory", 1024 * 1024 * 1024).toLongLong(); - return QtConcurrent::mapped(previews, Renderer(scaleX, scaleY, maxPreviewImageMemUsage)); }