Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Okular
Commits
92647230
Commit
92647230
authored
Sep 13, 2020
by
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
Changes
6
Hide whitespace changes
Inline
Side-by-side
autotests/signatureformtest.cpp
View file @
92647230
...
...
@@ -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
)
...
...
generators/poppler/CMakeLists.txt
View file @
92647230
...
...
@@ -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()
...
...
generators/poppler/config-okular-poppler.h.cmake
View file @
92647230
/* 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
...
...
generators/poppler/generator_pdf.cpp
View file @
92647230
...
...
@@ -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\n
Built against Poppler %2"
,
Poppler
::
Version
::
string
(),
POPPLER_VERSION
);
}
#endif
}
return
QVariant
();
}
...
...
generators/poppler/pdfsignatureutils.cpp
View file @
92647230
...
...
@@ -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
()
...
...
generators/poppler/pdfsignatureutils.h
View file @
92647230
...
...
@@ -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:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment