diff --git a/autotests/parttest.cpp b/autotests/parttest.cpp index bcfdb3ff6..bef28b387 100644 --- a/autotests/parttest.cpp +++ b/autotests/parttest.cpp @@ -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); diff --git a/autotests/visibilitytest.cpp b/autotests/visibilitytest.cpp index aa632405c..3dd986fe3 100644 --- a/autotests/visibilitytest.cpp +++ b/autotests/visibilitytest.cpp @@ -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")]; diff --git a/generators/poppler/CMakeLists.txt b/generators/poppler/CMakeLists.txt index bbb0d386d..8a65b4429 100644 --- a/generators/poppler/CMakeLists.txt +++ b/generators/poppler/CMakeLists.txt @@ -5,20 +5,6 @@ add_subdirectory( conf ) set(CMAKE_REQUIRED_LIBRARIES Poppler::Qt5 Qt5::Core Qt5::Gui) -check_cxx_source_compiles(" -#include -#include -#include -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 #include diff --git a/generators/poppler/config-okular-poppler.h.cmake b/generators/poppler/config-okular-poppler.h.cmake index fab3db1b6..3d34e8198 100644 --- a/generators/poppler/config-okular-poppler.h.cmake +++ b/generators/poppler/config-okular-poppler.h.cmake @@ -1,6 +1,3 @@ -/* 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 diff --git a/generators/poppler/formfields.cpp b/generators/poppler/formfields.cpp index 6f2eb0cc7..ded3f72bc 100644 --- a/generators/poppler/formfields.cpp +++ b/generators/poppler/formfields.cpp @@ -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 diff --git a/generators/poppler/generator_pdf.cpp b/generators/poppler/generator_pdf.cpp index e1e4b45b2..8aeb82b07 100644 --- a/generators/poppler/generator_pdf.cpp +++ b/generators/poppler/generator_pdf.cpp @@ -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(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 nextActions; const QVector nextLinks = popplerLink->nextLinks(); @@ -500,7 +497,6 @@ Okular::Action *createLinkFromPopplerLink(const Poppler::Link *popplerLink, bool } link->setNextActions(nextActions); } -#endif if (deletePopplerLink) delete popplerLink;