Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Graphics
Okular
Commits
c019a7e7
Commit
c019a7e7
authored
Sep 13, 2020
by
Albert Astals Cid
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove poppler 0.64 ifdefs since we require 0.86 now
parent
bcd36d63
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
58 deletions
+0
-58
autotests/parttest.cpp
autotests/parttest.cpp
+0
-4
autotests/visibilitytest.cpp
autotests/visibilitytest.cpp
+0
-9
generators/poppler/CMakeLists.txt
generators/poppler/CMakeLists.txt
+0
-14
generators/poppler/config-okular-poppler.h.cmake
generators/poppler/config-okular-poppler.h.cmake
+0
-3
generators/poppler/formfields.cpp
generators/poppler/formfields.cpp
+0
-24
generators/poppler/generator_pdf.cpp
generators/poppler/generator_pdf.cpp
+0
-4
No files found.
autotests/parttest.cpp
View file @
c019a7e7
...
...
@@ -1387,10 +1387,6 @@ void PartTest::test388288()
void
PartTest
::
testCheckBoxReadOnly
()
{
#ifndef HAVE_POPPLER_0_64
return
;
#endif
const
QString
testFile
=
QStringLiteral
(
KDESRCDIR
"data/checkbox_ro.pdf"
);
Okular
::
Part
part
(
nullptr
,
nullptr
,
QVariantList
());
part
.
openDocument
(
testFile
);
...
...
autotests/visibilitytest.cpp
View file @
c019a7e7
...
...
@@ -86,9 +86,6 @@ void VisibilityTest::verifyTargetStates(bool visible)
void
VisibilityTest
::
testJavaScriptVisibility
()
{
#ifndef HAVE_POPPLER_0_64
return
;
#endif
auto
hideBtn
=
m_fields
[
QStringLiteral
(
"HideScriptButton"
)];
auto
showBtn
=
m_fields
[
QStringLiteral
(
"ShowScriptButton"
)];
...
...
@@ -107,9 +104,6 @@ void VisibilityTest::testJavaScriptVisibility()
void
VisibilityTest
::
testSaveLoad
()
{
#ifndef HAVE_POPPLER_0_64
return
;
#endif
auto
hideBtn
=
m_fields
[
QStringLiteral
(
"HideScriptButton"
)];
auto
showBtn
=
m_fields
[
QStringLiteral
(
"ShowScriptButton"
)];
...
...
@@ -155,9 +149,6 @@ void VisibilityTest::testSaveLoad()
void
VisibilityTest
::
testActionVisibility
()
{
#ifndef HAVE_POPPLER_0_64
return
;
#endif
auto
hideBtn
=
m_fields
[
QStringLiteral
(
"HideActionButton"
)];
auto
showBtn
=
m_fields
[
QStringLiteral
(
"ShowActionButton"
)];
...
...
generators/poppler/CMakeLists.txt
View file @
c019a7e7
...
...
@@ -5,20 +5,6 @@ add_subdirectory( conf )
set
(
CMAKE_REQUIRED_LIBRARIES Poppler::Qt5 Qt5::Core Qt5::Gui
)
check_cxx_source_compiles
(
"
#include <poppler-qt5.h>
#include <poppler-form.h>
#include <poppler-link.h>
int main()
{
Poppler::FormField *f = nullptr;
f->setReadOnly(true);
f->setVisible(true);
Poppler::Link *l = nullptr;
l->nextLinks();
}
"
HAVE_POPPLER_0_64
)
check_cxx_source_compiles
(
"
#include <poppler-qt5.h>
#include <poppler-form.h>
...
...
generators/poppler/config-okular-poppler.h.cmake
View file @
c019a7e7
/* Defined if we have the 0.64 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_64 1
/* Defined if we have the 0.65 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_65 1
...
...
generators/poppler/formfields.cpp
View file @
c019a7e7
...
...
@@ -81,11 +81,7 @@ bool PopplerFormFieldButton::isReadOnly() const
void
PopplerFormFieldButton
::
setReadOnly
(
bool
value
)
{
#ifdef HAVE_POPPLER_0_64
m_field
->
setReadOnly
(
value
);
#else
Q_UNUSED
(
value
);
#endif
}
bool
PopplerFormFieldButton
::
isVisible
()
const
...
...
@@ -95,11 +91,7 @@ bool PopplerFormFieldButton::isVisible() const
void
PopplerFormFieldButton
::
setVisible
(
bool
value
)
{
#ifdef HAVE_POPPLER_0_64
m_field
->
setVisible
(
value
);
#else
Q_UNUSED
(
value
);
#endif
}
bool
PopplerFormFieldButton
::
isPrintable
()
const
...
...
@@ -213,11 +205,7 @@ bool PopplerFormFieldText::isReadOnly() const
void
PopplerFormFieldText
::
setReadOnly
(
bool
value
)
{
#ifdef HAVE_POPPLER_0_64
m_field
->
setReadOnly
(
value
);
#else
Q_UNUSED
(
value
);
#endif
}
bool
PopplerFormFieldText
::
isVisible
()
const
...
...
@@ -227,11 +215,7 @@ bool PopplerFormFieldText::isVisible() const
void
PopplerFormFieldText
::
setVisible
(
bool
value
)
{
#ifdef HAVE_POPPLER_0_64
m_field
->
setVisible
(
value
);
#else
Q_UNUSED
(
value
);
#endif
}
bool
PopplerFormFieldText
::
isPrintable
()
const
...
...
@@ -359,11 +343,7 @@ bool PopplerFormFieldChoice::isReadOnly() const
void
PopplerFormFieldChoice
::
setReadOnly
(
bool
value
)
{
#ifdef HAVE_POPPLER_0_64
m_field
->
setReadOnly
(
value
);
#else
Q_UNUSED
(
value
);
#endif
}
bool
PopplerFormFieldChoice
::
isVisible
()
const
...
...
@@ -373,11 +353,7 @@ bool PopplerFormFieldChoice::isVisible() const
void
PopplerFormFieldChoice
::
setVisible
(
bool
value
)
{
#ifdef HAVE_POPPLER_0_64
m_field
->
setVisible
(
value
);
#else
Q_UNUSED
(
value
);
#endif
}
bool
PopplerFormFieldChoice
::
isPrintable
()
const
...
...
generators/poppler/generator_pdf.cpp
View file @
c019a7e7
...
...
@@ -472,7 +472,6 @@ Okular::Action *createLinkFromPopplerLink(const Poppler::Link *popplerLink, bool
link
=
movieAction
;
}
break
;
#ifdef HAVE_POPPLER_0_64
case
Poppler
::
Link
::
Hide
:
{
const
Poppler
::
LinkHide
*
l
=
static_cast
<
const
Poppler
::
LinkHide
*>
(
popplerLink
);
QStringList
scripts
;
...
...
@@ -482,7 +481,6 @@ Okular::Action *createLinkFromPopplerLink(const Poppler::Link *popplerLink, bool
}
link
=
new
Okular
::
ScriptAction
(
Okular
::
JavaScript
,
scripts
.
join
(
QLatin1Char
(
'\n'
)));
}
break
;
#endif
case
Poppler
::
Link
::
OCGState
:
link
=
new
Okular
::
BackendOpaqueAction
();
...
...
@@ -491,7 +489,6 @@ Okular::Action *createLinkFromPopplerLink(const Poppler::Link *popplerLink, bool
break
;
}
#ifdef HAVE_POPPLER_0_64
if
(
link
)
{
QVector
<
Okular
::
Action
*>
nextActions
;
const
QVector
<
Poppler
::
Link
*>
nextLinks
=
popplerLink
->
nextLinks
();
...
...
@@ -500,7 +497,6 @@ Okular::Action *createLinkFromPopplerLink(const Poppler::Link *popplerLink, bool
}
link
->
setNextActions
(
nextActions
);
}
#endif
if
(
deletePopplerLink
)
delete
popplerLink
;
...
...
Write
Preview
Markdown
is supported
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