Lines 30-35
Link Here
|
30 |
|
30 |
|
31 |
#include <kpluginfactory.h> |
31 |
#include <kpluginfactory.h> |
32 |
|
32 |
|
|
|
33 |
#include <poppler-version.h> |
34 |
|
35 |
#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) |
36 |
|
33 |
// Don't show this warning: it's an issue in poppler |
37 |
// Don't show this warning: it's an issue in poppler |
34 |
#ifdef __GNUC__ |
38 |
#ifdef __GNUC__ |
35 |
#pragma GCC diagnostic ignored "-Wunused-parameter" |
39 |
#pragma GCC diagnostic ignored "-Wunused-parameter" |
Lines 73-83
KoFilter::ConversionStatus PdfImport::co
Link Here
|
73 |
if (! globalParams) |
73 |
if (! globalParams) |
74 |
return KoFilter::NotImplemented; |
74 |
return KoFilter::NotImplemented; |
75 |
|
75 |
|
76 |
#ifdef HAVE_POPPLER_PRE_22_3 |
76 |
#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) |
77 |
GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); |
77 |
GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); |
78 |
PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); |
78 |
PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); |
79 |
#else |
79 |
#else |
80 |
PDFDoc * pdfDoc = new PDFDoc(std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data())); |
80 |
std::unique_ptr<GooString> fname = std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()); |
|
|
81 |
PDFDoc * pdfDoc = new PDFDoc(std::move(fname)); |
81 |
#endif |
82 |
#endif |
82 |
if (! pdfDoc) { |
83 |
if (! pdfDoc) { |
83 |
#ifdef HAVE_POPPLER_PRE_0_83 |
84 |
#ifdef HAVE_POPPLER_PRE_0_83 |
84 |
- |
|
|