Commit c019a7e7 authored by Albert Astals Cid's avatar Albert Astals Cid

Remove poppler 0.64 ifdefs since we require 0.86 now

parent bcd36d63
......@@ -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);
......
......@@ -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")];
......
......@@ -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>
......
/* 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
......
......@@ -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
......
......@@ -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;
......
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