Commit 92647230 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Remove poppler 0.73 ifdefs since we require 0.86 now

This actually fixes a mistake in SignatureFormTest::testSignatureForm
parent e283da99
......@@ -43,7 +43,6 @@ void SignatureFormTest::cleanupTestCase()
void SignatureFormTest::testSignatureForm()
{
#ifndef HAVE_POPPLER_0_73
const QString testFile = QStringLiteral(KDESRCDIR "data/pdf_with_signature.pdf");
QMimeDatabase db;
const QMimeType mime = db.mimeTypeForFile(testFile);
......@@ -56,7 +55,6 @@ void SignatureFormTest::testSignatureForm()
Okular::FormFieldSignature *sf = static_cast<Okular::FormFieldSignature *>(pageFields.first());
QCOMPARE(sf->signatureType(), Okular::FormFieldSignature::AdbePkcs7detached);
#endif
}
QTEST_MAIN(SignatureFormTest)
......
......@@ -5,16 +5,6 @@ add_subdirectory( conf )
set(CMAKE_REQUIRED_LIBRARIES Poppler::Qt5 Qt5::Core Qt5::Gui)
check_cxx_source_compiles("
#include <poppler-version.h>
int main()
{
QString s = Poppler::Version::string();
(void)s;
return 0;
}
" HAVE_POPPLER_0_73)
check_cxx_source_compiles("
#include <poppler-qt5.h>
int main()
......
/* Defined if we have the 0.73 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_73 1
/* Defined if we have the 0.74 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_74 1
......
......@@ -55,9 +55,7 @@
#include "ui_pdfsettingswidget.h"
#include <poppler-media.h>
#ifdef HAVE_POPPLER_0_73
#include <poppler-version.h>
#endif
#include "annots.h"
#include "debug_pdf.h"
......@@ -70,11 +68,7 @@ Q_DECLARE_METATYPE(const Poppler::LinkMovie *)
Q_DECLARE_METATYPE(const Poppler::LinkRendition *)
Q_DECLARE_METATYPE(const Poppler::LinkOCGState *)
#ifdef HAVE_POPPLER_0_73
#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO))
#else
#define POPPLER_VERSION_MACRO 0
#endif
static const int defaultPageWidth = 595;
static const int defaultPageHeight = 842;
......@@ -1451,13 +1445,11 @@ QVariant PDFGenerator::metaData(const QString &key, const QVariant &option) cons
QMutexLocker ml(userMutex());
return QVariant::fromValue<QVector<int>>(pdfdoc->formCalculateOrder());
} else if (key == QLatin1String("GeneratorExtraDescription")) {
#ifdef HAVE_POPPLER_0_73
if (Poppler::Version::string() == QStringLiteral(POPPLER_VERSION)) {
return i18n("Using Poppler %1", Poppler::Version::string());
} else {
return i18n("Using Poppler %1\n\nBuilt against Poppler %2", Poppler::Version::string(), POPPLER_VERSION);
}
#endif
}
return QVariant();
}
......
......@@ -12,8 +12,6 @@
#include <KLocalizedString>
#include <QDebug>
#ifdef HAVE_POPPLER_0_73
PopplerCertificateInfo::PopplerCertificateInfo(const Poppler::CertificateInfo &info)
: m_info(info)
{
......@@ -119,22 +117,10 @@ QByteArray PopplerCertificateInfo::certificateData() const
return m_info.certificateData();
}
#else
class DummyCertificateInfo : public Okular::CertificateInfo
{
};
#endif
PopplerSignatureInfo::PopplerSignatureInfo(const Poppler::SignatureValidationInfo &info)
: m_info(info)
{
#ifdef HAVE_POPPLER_0_73
m_certfiticateInfo = new PopplerCertificateInfo(m_info.certificateInfo());
#else
m_certfiticateInfo = new DummyCertificateInfo();
#endif
}
PopplerSignatureInfo::~PopplerSignatureInfo()
......
......@@ -16,8 +16,6 @@
#include <config-okular-poppler.h>
#ifdef HAVE_POPPLER_0_73
class PopplerCertificateInfo : public Okular::CertificateInfo
{
public:
......@@ -42,8 +40,6 @@ private:
Poppler::CertificateInfo m_info;
};
#endif
class PopplerSignatureInfo : public Okular::SignatureInfo
{
public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment