Merge pull request #573 from letsfindaway/571-poppler-22.03

fix: compile with poppler >= 22.01
preferencesAboutTextFull
kaamui 3 years ago committed by GitHub
commit 3a9b043e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/pdf/XPDFRenderer.cpp
  2. 1
      src/pdf/pdf.pri

@ -95,6 +95,8 @@ XPDFRenderer::XPDFRenderer(const QString &filename, bool importingFile)
} }
#ifdef USE_XPDF #ifdef USE_XPDF
mDocument = new PDFDoc(new GString(filename.toLocal8Bit()), 0, 0, 0); // the filename GString is deleted on PDFDoc desctruction 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<GooString>(filename.toLocal8Bit()));
#else #else
mDocument = new PDFDoc(new GooString(filename.toLocal8Bit()), 0, 0, 0); // the filename GString is deleted on PDFDoc desctruction mDocument = new PDFDoc(new GooString(filename.toLocal8Bit()), 0, 0, 0); // the filename GString is deleted on PDFDoc desctruction
#endif #endif

@ -1,3 +1,4 @@
CONFIG += c++17
HEADERS += src/pdf/GraphicsPDFItem.h \ HEADERS += src/pdf/GraphicsPDFItem.h \
src/pdf/PDFRenderer.h \ src/pdf/PDFRenderer.h \

Loading…
Cancel
Save