diff --git a/src/pdf/XPDFRenderer.cpp b/src/pdf/XPDFRenderer.cpp index a81616b8..56826565 100644 --- a/src/pdf/XPDFRenderer.cpp +++ b/src/pdf/XPDFRenderer.cpp @@ -95,6 +95,8 @@ XPDFRenderer::XPDFRenderer(const QString &filename, bool importingFile) } #ifdef USE_XPDF mDocument = new PDFDoc(new GString(filename.toLocal8Bit()), 0, 0, 0); // the filename GString is deleted on PDFDoc desctruction +#elif POPPLER_VERSION_MAJOR > 22 || (POPPLER_VERSION_MAJOR == 22 && POPPLER_VERSION_MINOR >= 3) + mDocument = new PDFDoc(std::make_unique(filename.toLocal8Bit())); #else mDocument = new PDFDoc(new GooString(filename.toLocal8Bit()), 0, 0, 0); // the filename GString is deleted on PDFDoc desctruction #endif diff --git a/src/pdf/pdf.pri b/src/pdf/pdf.pri index 9be1b7fe..aeb09b5b 100644 --- a/src/pdf/pdf.pri +++ b/src/pdf/pdf.pri @@ -1,3 +1,4 @@ +CONFIG += c++17 HEADERS += src/pdf/GraphicsPDFItem.h \ src/pdf/PDFRenderer.h \