diff --git a/autotests/kjsfunctionstest.cpp b/autotests/kjsfunctionstest.cpp index 6350572d1..86d4c3322 100644 --- a/autotests/kjsfunctionstest.cpp +++ b/autotests/kjsfunctionstest.cpp @@ -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 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" diff --git a/generators/poppler/CMakeLists.txt b/generators/poppler/CMakeLists.txt index 1d92d25f8..9a1cc6496 100644 --- a/generators/poppler/CMakeLists.txt +++ b/generators/poppler/CMakeLists.txt @@ -5,18 +5,6 @@ add_subdirectory( conf ) set(CMAKE_REQUIRED_LIBRARIES Poppler::Qt5 Qt5::Core Qt5::Gui) -check_cxx_source_compiles(" -#include -#include -int main() -{ - Poppler::FormFieldIcon icon(nullptr); - Poppler::FormFieldButton *button = nullptr; - button->setIcon( icon ); - return 0; -} -" HAVE_POPPLER_0_79) - check_cxx_source_compiles(" #include int main() diff --git a/generators/poppler/config-okular-poppler.h.cmake b/generators/poppler/config-okular-poppler.h.cmake index 24a3101d6..b44fe0d0d 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.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 diff --git a/generators/poppler/formfields.cpp b/generators/poppler/formfields.cpp index 2c1590526..5ceae5135 100644 --- a/generators/poppler/formfields.cpp +++ b/generators/poppler/formfields.cpp @@ -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 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(field); m_field->setIcon(button->icon()); } -#else - Q_UNUSED(field); -#endif } PopplerFormFieldText::PopplerFormFieldText(std::unique_ptr 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 diff --git a/generators/poppler/formfields.h b/generators/poppler/formfields.h index e27cb618b..b00717b8b 100644 --- a/generators/poppler/formfields.h +++ b/generators/poppler/formfields.h @@ -40,14 +40,12 @@ public: void setState(bool state) override; QList 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 m_field;