]> danny-edel.de - dspdfviewer.git/commitdiff
drop qt4 support
authorDanny Edel <mail@danny-edel.de>
Thu, 20 Oct 2022 11:09:52 +0000 (13:09 +0200)
committerDanny Edel <mail@danny-edel.de>
Thu, 20 Oct 2022 12:05:24 +0000 (14:05 +0200)
13 files changed:
.appveyor.yml
.github/workflows/fixme-windows.txt
.github/workflows/osx.yml
.github/workflows/ubuntu.yml
CHANGELOG.md
CMakeLists.txt
INSTALL
cmake/compiler_gnu_gcc.cmake
cmake/external_libraries.cmake
cmake/qrc_embedding.cmake
debian/rules
docs/installation/source/options.md
testing/CMakeLists.txt

index b59ef80feecf30d2b3ad1d4a8cb85e48790a7385..bf52d4a01346f4ed14a7aa315cbb43bcf1d04ed2 100644 (file)
@@ -22,7 +22,6 @@ before_build:
     - cmd: >
         cmake ..
         -G "Visual Studio 12 2013" -T v120_xp
-        -DUseQtFive=ON
         -DUsePrerenderedPDF=ON
         -DBoostStaticLink=ON
         -DWindowsStaticLink=OFF
index f17fd1414f05247945b49b216314d5e0e03c4195..37d154a10df562f89933a02729e2be67d1477ccd 100644 (file)
@@ -28,7 +28,6 @@ before_build:
     - cmd: >
         cmake ..
         -G "Visual Studio 12 2013" -T v120_xp
-        -DUseQtFive=ON
         -DUsePrerenderedPDF=ON
         -DBoostStaticLink=ON
         -DWindowsStaticLink=OFF
index bc8a3bb34cad988cf266354dd224a7c41bee50cd..e7854fa7855f7059c1edfa73d71f4a96b8cdf5f6 100644 (file)
@@ -26,7 +26,6 @@ jobs:
           -DCMAKE_VERBOSE_MAKEFILE=ON
           -DUsePrerenderedPDF=ON
           -DCodeCoverage=ON
-          -DUseQtFive=ON
           -DCMAKE_BUILD_TYPE=${{matrix.buildtype}}
           .
       - run: cmake --build build/
index b3e6bfb937f55b8413baadb69400ea27e37120c8..560eee537adc63c3c8cdb37773697023cc229d8e 100644 (file)
@@ -31,7 +31,6 @@ jobs:
           -DCMAKE_VERBOSE_MAKEFILE=ON
           -DUsePrerenderedPDF=ON
           -DCodeCoverage=ON
-          -DUseQtFive=ON
           -DCMAKE_BUILD_TYPE=${{matrix.buildtype}}
           .
       - run: cmake --build build/
index 7936af73bbf3dbb3e255ad3ce49f8d801a9f1b39..7414745103e2e9a37ce542fd4a46cd488f577d3c 100644 (file)
@@ -7,6 +7,15 @@ If you're intrested in the specific source-level changes between versions,
 or non user-relevant changes (like build system or packaging related), please
 inspect the output of commands like `git diff -w v1.11..v1.12` directly.
 
+v1.15.2 - UNRELEASED
+--------------------
+
+This is a maintenance release, not introducing any new functionality,
+but restoring compatibility with Qt 5.15 LTS.
+
+Building with Qt4 is no longer supported.  If you really need Qt4
+support, please get in touch.
+
 
 v1.15.1 - 2016-09-13
 --------------------
index ce37ea2f809dd960cc1a1e92d314bbb96c1df025..6ba8dfa2c3c6c96f75367bc0db7b57858637e03e 100644 (file)
@@ -38,7 +38,6 @@ set(CMAKE_AUTORCC OFF)
 set(CMAKE_INCLUDE_CURRENT_DIR OFF)
 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
-option(UseQtFive "Build with Qt5 and libpoppler-qt5" ON)
 option(UpdateTranslations "Do you want to update the .ts files (WARNING: running make clean will delete them!)" OFF)
 option(BuildTests "Build unit tests (this requires pdflatex or internet access and DownloadTestPDFs=ON)" ON)
 option(RunDualScreenTests "Also run tests that require two screens to be connected" ON)
diff --git a/INSTALL b/INSTALL
index f9e34ab1e75979105c086e5fb9b8f903298389eb..c268cad7ecb4a4081489f8db03cd0b6096129cb0 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -22,8 +22,8 @@ Installation from source (generic cmake)
 dspdfviewer requires the following build-time dependencies:
   * cmake
   * boost
-  * qt4
-  * poppler-qt4
+  * qt5
+  * poppler-qt5
 
 From inside the source directory, execute the following steps:
 
@@ -37,12 +37,3 @@ Note that there is no make uninstall, so please redirect the make install
 step through your system's package management utility. The
 "cmake" step will respect --prefix= parameters, and "make install"
 will respect DESTDIR.
-
-
-
-Compiling against qt5 and poppler-qt5
--------------------------------------
-There is now experimental support for compiling against qt5/libpoppler-qt5.
-
-To try it out, substitute the "cmake" step above against
-  cmake -DUseQtFive=ON ..
index 20d614cb696b77d67a0f0a46537968cbf480dbc8..5b2fb0ab74a8724398d7b9c8c1e919acd650cef2 100644 (file)
@@ -32,15 +32,6 @@ add_definitions(
 # Turn all warnings into errors
 add_definitions(-Werror -pedantic-errors)
 
-# These warnings produce false positives on some older qt4 libraries
-# (this failed debian s390x compilation), therefore tune them back
-# to warning when building against qt4.
-
-if( NOT UseQtFive )
-       add_definitions(-Wno-error=old-style-cast)
-       add_definitions(-Wno-error=effc++)
-endif()
-
 if(CodeCoverage)
        message(STATUS "Adding gcov as test coverage helper")
        add_definitions(-fprofile-arcs -ftest-coverage -O0)
index cacfbcc1bf977814e830409b29a49d07589fbc06..2f81fa22c35bf816f5dc027c7f2e7518691dff1a 100644 (file)
@@ -28,97 +28,74 @@ else()
 endif()
 
 
-### Qt
-if(UseQtFive)
-       # Qt5
-       message(STATUS "Using Qt5 and libpoppler-qt5")
-       if(MSVC AND WindowsStaticLink)
-               # If linking statically,
-               # Try to find Qt in /qt/static/qtbase
-               # or plain /qt/static
-               set(CMAKE_PREFIX_PATH
-                       "/Qt/static/qtbase;/Qt/static;/Qt/static/qttools;${CMAKE_PREFIX_PATH}")
-       endif()
-       find_package(Qt5Core 5.1.1 REQUIRED)
-       # On lower versions, QTBUG-32100 prevents compilation at least on clang
-       # https://bugreports.qt.io/browse/QTBUG-32100
-       find_package(Qt5Gui REQUIRED)
-       find_package(Qt5Widgets REQUIRED)
-       find_package(Qt5LinguistTools REQUIRED)
-       find_package(Qt5Xml REQUIRED)
-       message(STATUS "Found Qt5 at ${Qt5Core_DIR}")
+# Qt5
+message(STATUS "Using Qt5 and libpoppler-qt5")
+if(MSVC AND WindowsStaticLink)
+       # If linking statically,
+       # Try to find Qt in /qt/static/qtbase
+       # or plain /qt/static
+       set(CMAKE_PREFIX_PATH
+               "/Qt/static/qtbase;/Qt/static;/Qt/static/qttools;${CMAKE_PREFIX_PATH}")
+endif()
+find_package(Qt5Core 5.1.1 REQUIRED)
+# On lower versions, QTBUG-32100 prevents compilation at least on clang
+# https://bugreports.qt.io/browse/QTBUG-32100
+find_package(Qt5Gui REQUIRED)
+find_package(Qt5Widgets REQUIRED)
+find_package(Qt5LinguistTools REQUIRED)
+find_package(Qt5Xml REQUIRED)
+message(STATUS "Found Qt5 at ${Qt5Core_DIR}")
 
-       if(MSVC)
-               if (WindowsStaticLink)
-                       set(POPPLER_LIBRARIES
-                               ${WINDOWS_PRECOMPILED_STATIC_LIBRARIES}
-                       )
-                       set(POPPLER_INCLUDE_DIRS
-                               "C:/dspdf/poppler/poppler/include/poppler/qt5"
-                       )
-               else() # MSVC, but not statically linking
-                       set(POPPLER_LIBRARIES
-                               ${WINDOWS_PRECOMPILED_DYNAMIC_LIBRARIES}
-                       )
-                       set(POPPLER_INCLUDE_DIRS
-                               "C:/dspdf/popplerDyn/poppler/include/poppler/qt5"
-                       )
-               endif()
-       else()
-               # Non-MSVC Platforms:
-               # Find poppler using pkg-config
-               pkg_search_module(POPPLER REQUIRED poppler-qt5)
+if(MSVC)
+       if (WindowsStaticLink)
+               set(POPPLER_LIBRARIES
+                       ${WINDOWS_PRECOMPILED_STATIC_LIBRARIES}
+               )
+               set(POPPLER_INCLUDE_DIRS
+                       "C:/dspdf/poppler/poppler/include/poppler/qt5"
+               )
+       else() # MSVC, but not statically linking
+               set(POPPLER_LIBRARIES
+                       ${WINDOWS_PRECOMPILED_DYNAMIC_LIBRARIES}
+               )
+               set(POPPLER_INCLUDE_DIRS
+                       "C:/dspdf/popplerDyn/poppler/include/poppler/qt5"
+               )
        endif()
+else()
+       # Non-MSVC Platforms:
+       # Find poppler using pkg-config
+       pkg_search_module(POPPLER REQUIRED poppler-qt5)
+endif()
 
-       # add their link flags
-       list(APPEND LIST_LIBRARIES
-               ${Qt5Core_LIBRARIES}
-               ${Qt5Gui_LIBRARIES}
-               ${Qt5Widgets_LIBRARIES}
-               ${Qt5LinguistTools_LIBRARIES}
-               ${Qt5Xml_LIBRARIES}
-       )
+# add their link flags
+list(APPEND LIST_LIBRARIES
+       ${Qt5Core_LIBRARIES}
+       ${Qt5Gui_LIBRARIES}
+       ${Qt5Widgets_LIBRARIES}
+       ${Qt5LinguistTools_LIBRARIES}
+       ${Qt5Xml_LIBRARIES}
+)
 
-       # add their include directories
-       list(APPEND LIST_INCLUDE_DIRS
-               ${Qt5Core_INCLUDE_DIRS}
-               ${Qt5Gui_INCLUDE_DIRS}
-               ${Qt5Widgets_INCLUDE_DIRS}
-               ${Qt5LinguistTools_INCLUDE_DIRS}
-               ${Qt5Xml_INCLUDE_DIRS}
-       )
+# add their include directories
+list(APPEND LIST_INCLUDE_DIRS
+       ${Qt5Core_INCLUDE_DIRS}
+       ${Qt5Gui_INCLUDE_DIRS}
+       ${Qt5Widgets_INCLUDE_DIRS}
+       ${Qt5LinguistTools_INCLUDE_DIRS}
+       ${Qt5Xml_INCLUDE_DIRS}
+)
 
-       # Set conditional compilation to Qt5 mode
-       add_definitions(-DPOPPLER_QT5)
-       qt5_wrap_ui(dspdfviewer_UIS_H ${UIFILES})
-       if( UpdateTranslations )
-               qt5_create_translation(TRANSLATIONS
-                       ${libdspdfviewer_SRCS} ${dspdfviewer_SRCS} ${UIFILES} ${TRANSLATIONFILES}
-                       OPTIONS -no-obsolete
-                       )
-       else()
-               qt5_add_translation(TRANSLATIONS ${TRANSLATIONFILES})
-       endif()
+# Set conditional compilation to Qt5 mode
+add_definitions(-DPOPPLER_QT5)
+qt5_wrap_ui(dspdfviewer_UIS_H ${UIFILES})
+if( UpdateTranslations )
+       qt5_create_translation(TRANSLATIONS
+               ${libdspdfviewer_SRCS} ${dspdfviewer_SRCS} ${UIFILES} ${TRANSLATIONFILES}
+               OPTIONS -no-obsolete
+               )
 else()
-       #qt4
-       message(STATUS "Using Qt4 and libpoppler-qt4")
-       message(WARNING "Qt4 support is deprecated and will be removed in the next version. "
-               "Please build dspdfviewer using Qt5. "
-               "If that does not work correctly on your platform, please file a bug!")
-       find_package(Qt4 REQUIRED COMPONENTS QtCore QtGui)
-       pkg_search_module(POPPLER REQUIRED poppler-qt4)
-
-       list(APPEND LIST_INCLUDE_DIRS ${QT_INCLUDES})
-       list(APPEND LIST_LIBRARIES Qt4::QtGui)
-       qt4_wrap_ui(dspdfviewer_UIS_H ${UIFILES})
-       if( UpdateTranslations )
-               qt4_create_translation(TRANSLATIONS
-                       ${libdspdfviewer_SRCS} ${dspdfviewer_SRCS} ${UIFILES} ${TRANSLATIONFILES}
-                       OPTIONS -no-obsolete
-                       )
-       else()
-               qt4_add_translation(TRANSLATIONS ${TRANSLATIONFILES})
-       endif()
+       qt5_add_translation(TRANSLATIONS ${TRANSLATIONFILES})
 endif()
 
 # include/link poppler
index 40ef5afb6f46371eeca89d309c9987ab9550cf85..a2e49420422fd416c1fa7f0860fd5ed4bdf9e7aa 100644 (file)
@@ -13,12 +13,7 @@ foreach(qrc IN LISTS QRCFILES)
 
        set(TMP_OUTFILENAME "${CMAKE_CURRENT_BINARY_DIR}/${qrc}.cxx")
 
-       if(UseQtFive)
-               set(RCCCOMPILER ${Qt5Core_RCC_EXECUTABLE})
-       else()
-               set(RCCCOMPILER ${QT_RCC_EXECUTABLE})
-       endif()
-
+       set(RCCCOMPILER ${Qt5Core_RCC_EXECUTABLE})
 
        add_custom_command(
                OUTPUT ${TMP_OUTFILENAME}
index 086bbf1de4bf0f8d1001d01a92a52cce0d180bbe..45d4470e02b78789befe989594dbec3d3057db2d 100755 (executable)
@@ -14,8 +14,7 @@ include /usr/share/dpkg/buildflags.mk
 
 override_dh_auto_configure:
        dh_auto_configure -- \
-               -DDSPDFVIEWER_VERSION=$(shell dpkg-parsechangelog --show-field Version) \
-               -DUseQtFive=ON
+               -DDSPDFVIEWER_VERSION=$(shell dpkg-parsechangelog --show-field Version)
 
 %:
        dh $@ --parallel
index 67b4a2a6ad9d476511ff484ab1dd1ec9cb553806..7677fb2e7509f0b20389bb1022500852aebb1d82 100644 (file)
@@ -36,13 +36,6 @@ The following `cmake` options manipulate the compilation and dependency list:
   to include a dist-specific version.
   * By default, this is auto-detected using `git describe`, with a hardcoded
   fallback version number (such as, when not building from a git clone).
-* `UseQtFive` boolean, default ON
-  * If this is OFF, `dspdfviewer` will be built against `Qt4` and the
-  `poppler-qt4` bindings, instead of the Qt5 version.
-  * If this options is disabled, dspdfviewer depends on Qt4 and libpoppler-qt4,
-  and no longer depends on Qt5 or libpoppler-qt5.
-  * The Qt4 support will get dropped eventually.  Please use the Qt5
-  version and report bugs if you experience regressions compared to Qt4.
 * `UpdateTranslations` boolean, default OFF
   * If you want to work on the translation, you can activate this flag
   to make `cmake` regenerate the `.ts` files.
index 977cfff366569f225f7c09b4999a71b0be91caec..10ebcecb348f7a31ba9adc933ae59735bc25f499 100644 (file)
@@ -118,27 +118,25 @@ set_tests_properties(
 )
 
 # Only build and run the swap screen test on Qt5
-if(UseQtFive)
-       add_executable(testswapscreen
-               testswapscreen.cc
-               testswapscreen-main.cc
+add_executable(testswapscreen
+       testswapscreen.cc
+       testswapscreen-main.cc
+)
+target_link_libraries(testswapscreen
+       testhelp
+)
+
+if(RunDualScreenTests)
+       add_test(NAME testswapscreen
+               COMMAND testswapscreen
+                       --prerender-prev=0
+                       --prerender-next=0
+                       images.pdf
        )
-       target_link_libraries(testswapscreen
-               testhelp
+       set_tests_properties(testswapscreen
+               PROPERTIES
+                       SKIP_RETURN_CODE 77
        )
-
-       if(RunDualScreenTests)
-               add_test(NAME testswapscreen
-                       COMMAND testswapscreen
-                               --prerender-prev=0
-                               --prerender-next=0
-                               images.pdf
-               )
-               set_tests_properties(testswapscreen
-                       PROPERTIES
-                               SKIP_RETURN_CODE 77
-               )
-       endif()
 endif()