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
6b08af75
Commit
6b08af75
authored
Sep 13, 2020
by
Albert Astals Cid
Browse files
Remove poppler 0.79 ifdefs since we require 0.86 now
parent
4d12c257
Changes
5
Hide whitespace changes
Inline
Side-by-side
autotests/kjsfunctionstest.cpp
View file @
6b08af75
...
...
@@ -84,7 +84,6 @@ class KJSFunctionsTest : public QObject
Q_OBJECT
private
slots
:
#ifdef HAVE_POPPLER_0_79
void
initTestCase
();
void
testNthFieldName
();
void
testDisplay
();
...
...
@@ -99,11 +98,8 @@ private slots:
private:
Okular
::
Document
*
m_document
;
QMap
<
QString
,
Okular
::
FormField
*>
m_fields
;
#endif
};
#ifdef HAVE_POPPLER_0_79
void
KJSFunctionsTest
::
initTestCase
()
{
Okular
::
SettingsCore
::
instance
(
QStringLiteral
(
"kjsfunctionstest"
));
...
...
@@ -359,7 +355,5 @@ void KJSFunctionsTest::cleanupTestCase()
delete
m_document
;
}
#endif
QTEST_MAIN
(
KJSFunctionsTest
)
#include "kjsfunctionstest.moc"
generators/poppler/CMakeLists.txt
View file @
6b08af75
...
...
@@ -5,18 +5,6 @@ add_subdirectory( conf )
set
(
CMAKE_REQUIRED_LIBRARIES Poppler::Qt5 Qt5::Core Qt5::Gui
)
check_cxx_source_compiles
(
"
#include <poppler-form.h>
#include <poppler-qt5.h>
int main()
{
Poppler::FormFieldIcon icon(nullptr);
Poppler::FormFieldButton *button = nullptr;
button->setIcon( icon );
return 0;
}
"
HAVE_POPPLER_0_79
)
check_cxx_source_compiles
(
"
#include <poppler-qt5.h>
int main()
...
...
generators/poppler/config-okular-poppler.h.cmake
View file @
6b08af75
/* Defined if we have the 0.79 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_79 1
/* Defined if we have the 0.80 version of the Poppler library */
#cmakedefine HAVE_POPPLER_0_80 1
...
...
generators/poppler/formfields.cpp
View file @
6b08af75
...
...
@@ -92,20 +92,12 @@ void PopplerFormFieldButton::setVisible(bool value)
bool
PopplerFormFieldButton
::
isPrintable
()
const
{
#ifdef HAVE_POPPLER_0_79
return
m_field
->
isPrintable
();
#else
return
true
;
#endif
}
void
PopplerFormFieldButton
::
setPrintable
(
bool
value
)
{
#ifdef HAVE_POPPLER_0_79
m_field
->
setPrintable
(
value
);
#else
Q_UNUSED
(
value
);
#endif
}
Okular
::
FormFieldButton
::
ButtonType
PopplerFormFieldButton
::
buttonType
()
const
...
...
@@ -141,23 +133,17 @@ QList<int> PopplerFormFieldButton::siblings() const
return
m_field
->
siblings
();
}
#ifdef HAVE_POPPLER_0_79
Poppler
::
FormFieldIcon
PopplerFormFieldButton
::
icon
()
const
{
return
m_field
->
icon
();
}
#endif
void
PopplerFormFieldButton
::
setIcon
(
Okular
::
FormField
*
field
)
{
#ifdef HAVE_POPPLER_0_79
if
(
field
->
type
()
==
Okular
::
FormField
::
FormButton
)
{
PopplerFormFieldButton
*
button
=
static_cast
<
PopplerFormFieldButton
*>
(
field
);
m_field
->
setIcon
(
button
->
icon
());
}
#else
Q_UNUSED
(
field
);
#endif
}
PopplerFormFieldText
::
PopplerFormFieldText
(
std
::
unique_ptr
<
Poppler
::
FormFieldText
>
field
)
...
...
@@ -216,20 +202,12 @@ void PopplerFormFieldText::setVisible(bool value)
bool
PopplerFormFieldText
::
isPrintable
()
const
{
#ifdef HAVE_POPPLER_0_79
return
m_field
->
isPrintable
();
#else
return
true
;
#endif
}
void
PopplerFormFieldText
::
setPrintable
(
bool
value
)
{
#ifdef HAVE_POPPLER_0_79
m_field
->
setPrintable
(
value
);
#else
Q_UNUSED
(
value
);
#endif
}
Okular
::
FormFieldText
::
TextType
PopplerFormFieldText
::
textType
()
const
...
...
@@ -354,20 +332,12 @@ void PopplerFormFieldChoice::setVisible(bool value)
bool
PopplerFormFieldChoice
::
isPrintable
()
const
{
#ifdef HAVE_POPPLER_0_79
return
m_field
->
isPrintable
();
#else
return
true
;
#endif
}
void
PopplerFormFieldChoice
::
setPrintable
(
bool
value
)
{
#ifdef HAVE_POPPLER_0_79
m_field
->
setPrintable
(
value
);
#else
Q_UNUSED
(
value
);
#endif
}
Okular
::
FormFieldChoice
::
ChoiceType
PopplerFormFieldChoice
::
choiceType
()
const
...
...
generators/poppler/formfields.h
View file @
6b08af75
...
...
@@ -40,14 +40,12 @@ public:
void
setState
(
bool
state
)
override
;
QList
<
int
>
siblings
()
const
override
;
void
setIcon
(
Okular
::
FormField
*
field
)
override
;
#ifdef HAVE_POPPLER_0_79
/*
* Supported only in newer versions of Poppler library.
*
* @since 1.9
*/
Poppler
::
FormFieldIcon
icon
()
const
;
#endif
private:
std
::
unique_ptr
<
Poppler
::
FormFieldButton
>
m_field
;
...
...
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