From 500fc130709fc75aa4c1c85c662bb1130144cf5c Mon Sep 17 00:00:00 2001 From: Albert S Date: Mon, 29 Apr 2019 23:01:11 +0200 Subject: [PATCH] PdfWorker: generatePreviews: take const ref to container with search results --- gui/pdfworker.cpp | 4 ++-- gui/pdfworker.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/pdfworker.cpp b/gui/pdfworker.cpp index e7a4bfb..c792fe5 100644 --- a/gui/pdfworker.cpp +++ b/gui/pdfworker.cpp @@ -67,11 +67,11 @@ struct Renderer } }; -QFuture PdfWorker::generatePreviews(QVector paths, double scalefactor) +QFuture PdfWorker::generatePreviews(const QVector paths, double scalefactor) { QVector previews; - for(SearchResult &sr : paths) + for(const SearchResult &sr : paths) { for(int page : sr.pages) { diff --git a/gui/pdfworker.h b/gui/pdfworker.h index bf59072..efb5900 100644 --- a/gui/pdfworker.h +++ b/gui/pdfworker.h @@ -16,7 +16,7 @@ class PdfWorker : public QObject { Q_OBJECT public: - QFuture generatePreviews(QVector paths, double scalefactor); + QFuture generatePreviews(const QVector paths, double scalefactor); }; #endif // PDFWORKER_H