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