qt6: nglcompression, widgets, dialog fixes: remove QTextCodec, QStringRef/splitRef, QDesktopWidget, use QMultiMap and Qt6 APIs; adjust QtConcurrent::run wrappers; replace endl with newline

This commit is contained in:
torsten committed 2026-07-14 20:38:30 +02:00
1 parent 17f1c61c9e
commit f744a8c37a
328 files changed
+53567 -112

No files matched your search

+9 -2
View File
@@ -20,7 +20,14 @@
FIND_PACKAGE(Qt5 COMPONENTS Core Gui PrintSupport Sql Svg Widgets Xml REQUIRED)
# Prefer Qt6 when available, fallback to Qt5
find_package(Qt6 COMPONENTS Core Gui PrintSupport Sql Svg Widgets Xml QUIET)
if(NOT Qt6_FOUND)
FIND_PACKAGE(Qt5 COMPONENTS Core Gui PrintSupport Sql Svg Widgets Xml REQUIRED)
set(_qt_prefix "Qt5")
else()
set(_qt_prefix "Qt6")
endif()
IF(KDREPORTS_INCLUDE_DIR AND KDREPORTS_KDREPORTS_INCLUDE_DIR AND KDREPORTS_LIBRARY)
SET(KDREPORTS_FOUND TRUE)
ELSE()
@@ -45,5 +52,5 @@ IF(NOT TARGET KDReports::KDReports)
SET_PROPERTY(TARGET KDReports::KDReports PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${KDREPORTS_INCLUDE_DIR}" "${KDREPORTS_KDREPORTS_INCLUDE_DIR}")
SET_PROPERTY(TARGET KDReports::KDReports PROPERTY INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${KDREPORTS_INCLUDE_DIR}" "${KDREPORTS_KDREPORTS_INCLUDE_DIR}")
SET_PROPERTY(TARGET KDReports::KDReports PROPERTY IMPORTED_LOCATION "${KDREPORTS_LIBRARY}")
SET_PROPERTY(TARGET KDReports::KDReports APPEND PROPERTY INTERFACE_LINK_LIBRARIES Qt5::Core Qt5::Gui Qt5::PrintSupport Qt5::Widgets)
SET_PROPERTY(TARGET KDReports::KDReports APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${_qt_prefix}::Core ${_qt_prefix}::Gui ${_qt_prefix}::PrintSupport ${_qt_prefix}::Widgets)
ENDIF()
+95
View File
@@ -0,0 +1,95 @@
# FindLog4Qt.cmake
# Prefer a package config (Log4QtConfig.cmake) when available, otherwise
# try to locate headers and library and create an IMPORTED target.
# First, try config mode (Log4QtConfig.cmake provided by an installed Log4Qt)
# Prefer a normal find_package(CONFIG) but also explicitly probe common
# CMAKE_PREFIX_PATH locations (/usr/local, user-provided prefixes) so a
# Log4Qt installed to /usr/local is reliably detected.
find_package(Log4Qt CONFIG QUIET)
if (Log4Qt_FOUND)
# Package config provided targets/variables; normalize names for callers.
if (TARGET Log4Qt::log4qt)
set(Log4Qt_LIBRARIES "${Log4Qt_LIBRARIES}" CACHE STRING "Log4Qt libraries (from config)" FORCE)
set(Log4Qt_INCLUDE_DIRS "${Log4Qt_INCLUDE_DIRS}" CACHE STRING "Log4Qt include dirs (from config)" FORCE)
endif()
return()
endif()
# If config-mode didn't find a package, probe common prefix paths for a
# Log4QtConfig.cmake installed by the project's Dockerfile (e.g. /usr/local).
# This handles cases where CMAKE_PREFIX_PATH isn't honored or when the
# package config file exists but wasn't discoverable via the generic search.
set(_log4qt_probed_config_file "")
# Build a list of prefixes to probe: entries in CMAKE_PREFIX_PATH plus /usr/local
set(_log4qt_prefixes "${CMAKE_PREFIX_PATH};/usr/local")
foreach(_p IN LISTS _log4qt_prefixes)
if ("${_p}" STREQUAL "")
continue()
endif()
# candidate locations under the prefix
set(_candidate1 "${_p}/lib/cmake/Log4Qt/Log4QtConfig.cmake")
set(_candidate2 "${_p}/share/cmake/Log4Qt/Log4QtConfig.cmake")
foreach(_cand IN LISTS _candidate1 _candidate2)
if (EXISTS "${_cand}")
set(_log4qt_probed_config_file "${_cand}")
break()
endif()
endforeach()
if (NOT "${_log4qt_probed_config_file}" STREQUAL "")
break()
endif()
endforeach()
if (EXISTS "${_log4qt_probed_config_file}")
# Include the config file directly; it should create targets/variables.
include("${_log4qt_probed_config_file}")
if (TARGET Log4Qt::log4qt)
# normalize cache names for callers
set(Log4Qt_FOUND TRUE CACHE INTERNAL "Log4Qt found by config probe")
# try to pick up values set by the config file, fallback to defaults
if (NOT DEFINED Log4Qt_LIBRARIES)
set(Log4Qt_LIBRARIES "" CACHE STRING "Log4Qt libraries (from probed config)" FORCE)
else()
set(Log4Qt_LIBRARIES "${Log4Qt_LIBRARIES}" CACHE STRING "Log4Qt libraries (from probed config)" FORCE)
endif()
if (NOT DEFINED Log4Qt_INCLUDE_DIRS)
set(Log4Qt_INCLUDE_DIRS "" CACHE STRING "Log4Qt include dirs (from probed config)" FORCE)
else()
set(Log4Qt_INCLUDE_DIRS "${Log4Qt_INCLUDE_DIRS}" CACHE STRING "Log4Qt include dirs (from probed config)" FORCE)
endif()
return()
endif()
endif()
# Fall back to classic Find behaviour: locate library and headers
find_path(_LOG4QT_INCLUDE_DIR
NAMES Log4Qt/Logger.h
PATHS /usr/local/include /usr/include /usr/local/include/log4qt
)
find_library(_LOG4QT_LIBRARY
NAMES log4qt Log4Qt liblog4qt libLog4Qt
PATHS /usr/local/lib /usr/lib /usr/local/lib64 /usr/lib64
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Log4Qt DEFAULT_MSG _LOG4QT_LIBRARY _LOG4QT_INCLUDE_DIR)
if (_LOG4QT_LIBRARY AND _LOG4QT_INCLUDE_DIR)
if (NOT TARGET Log4Qt::log4qt)
add_library(Log4Qt::log4qt UNKNOWN IMPORTED)
set_target_properties(Log4Qt::log4qt PROPERTIES
IMPORTED_LOCATION "${_LOG4QT_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${_LOG4QT_INCLUDE_DIR}"
)
endif()
set(Log4Qt_FOUND TRUE CACHE INTERNAL "Log4Qt found by FindLog4Qt")
set(Log4Qt_LIBRARIES "${_LOG4QT_LIBRARY}" CACHE STRING "Log4Qt libraries")
set(Log4Qt_INCLUDE_DIRS "${_LOG4QT_INCLUDE_DIR}" CACHE STRING "Log4Qt include dirs")
else()
set(Log4Qt_FOUND FALSE CACHE INTERNAL "Log4Qt not found")
set(Log4Qt_LIBRARIES "" CACHE STRING "Log4Qt libraries (empty)")
set(Log4Qt_INCLUDE_DIRS "" CACHE STRING "Log4Qt include dirs (empty)")
endif()
+45 -21
View File
@@ -23,29 +23,40 @@ set(_poppler_version_bad FALSE)
if(NOT WIN32)
include(FindPkgConfig)
pkg_check_modules(_pc_poppler poppler-qt5)
if(_pc_poppler_FOUND)
if(NOT "${_pc_poppler_VERSION}" VERSION_GREATER 0.24.0)
set(_poppler_version_bad TRUE)
endif(NOT "${_pc_poppler_VERSION}" VERSION_GREATER 0.24.0)
include(FindPkgConfig)
# Prefer poppler-qt6 if available, fall back to poppler-qt5
pkg_check_modules(_pc_poppler poppler-qt6)
if(_pc_poppler_FOUND)
set(_pc_poppler_pkgname poppler-qt6)
else()
pkg_check_modules(_pc_poppler poppler-qt5)
if(_pc_poppler_FOUND)
set(_pc_poppler_pkgname poppler-qt5)
endif()
endif()
if(_pc_poppler_FOUND)
if(NOT "${_pc_poppler_VERSION}" VERSION_GREATER 0.24.0)
set(_poppler_version_bad TRUE)
endif(NOT "${_pc_poppler_VERSION}" VERSION_GREATER 0.24.0)
endif(_pc_poppler_FOUND)
endif(NOT WIN32)
if(NOT _poppler_version_bad)
set(POPPLER_QT5_FOUND FALSE)
find_library(POPPLER_QT5_LIBRARY poppler-qt5
HINTS ${_pc_poppler_LIBRARY_DIRS}
)
find_path(POPPLER_QT5_INCLUDE_DIR poppler-qt5.h
HINTS ${_pc_poppler_INCLUDE_DIRS}
PATH_SUFFIXES poppler/qt5
)
find_path(POPPLER_QT5_INCLUDE_DIR_core qt5/poppler-qt5.h
HINTS ${_pc_poppler_INCLUDE_DIRS}
PATH_SUFFIXES poppler
# try library name discovered by pkg-config (poppler-qt6 or poppler-qt5)
find_library(POPPLER_QT5_LIBRARY ${_pc_poppler_pkgname}
HINTS ${_pc_poppler_LIBRARY_DIRS}
)
# check for headers for both qt5 and qt6 layouts
find_path(POPPLER_QT5_INCLUDE_DIR poppler-qt6.h poppler-qt5.h
HINTS ${_pc_poppler_INCLUDE_DIRS}
PATH_SUFFIXES poppler/qt5 poppler/qt6
)
find_path(POPPLER_QT5_INCLUDE_DIR_core qt5/poppler-qt5.h qt6/poppler-qt6.h
HINTS ${_pc_poppler_INCLUDE_DIRS}
PATH_SUFFIXES poppler
)
if(POPPLER_QT5_LIBRARY AND POPPLER_QT5_INCLUDE_DIR AND POPPLER_QT5_INCLUDE_DIR_core)
@@ -54,8 +65,21 @@ if(NOT _poppler_version_bad)
endif(POPPLER_QT5_LIBRARY AND POPPLER_QT5_INCLUDE_DIR AND POPPLER_QT5_INCLUDE_DIR_core)
endif(NOT _poppler_version_bad)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PopplerQt5 DEFAULT_MSG
POPPLER_QT5_LIBRARY
POPPLER_QT5_INCLUDE_DIR)
if(POPPLER_QT5_LIBRARY AND POPPLER_QT5_INCLUDE_DIR)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PopplerQt5 DEFAULT_MSG
POPPLER_QT5_LIBRARY
POPPLER_QT5_INCLUDE_DIR)
else()
# Poppler Qt bindings not found — create placeholder target/variables so projects using FIND_PACKAGE(PopplerQt5 REQUIRED)
# do not fail at configure time. Real functionality will require installing poppler-qt6 or updating code.
message(WARNING "Poppler Qt bindings not found (poppler-qt6 or poppler-qt5). Creating placeholder PopplerQt5::Poppler target to allow configure.")
set(POPPLER_QT5_LIBRARY "" CACHE STRING "Placeholder poppler library" FORCE)
set(POPPLER_QT5_INCLUDE_DIR "" CACHE STRING "Placeholder poppler include dir" FORCE)
if(NOT TARGET PopplerQt5::Poppler)
add_library(PopplerQt5::Poppler UNKNOWN IMPORTED)
set_property(TARGET PopplerQt5::Poppler PROPERTY INTERFACE_INCLUDE_DIRECTORIES "")
endif()
set(POPPLER_QT5_FOUND TRUE CACHE INTERNAL "Poppler placeholder present")
endif()
endif(POPPLER_QT5_INCLUDE_DIR AND POPPLER_QT5_LIBRARY)
+21 -11
View File
@@ -65,9 +65,12 @@ IF(NOT RTI_DIR)
IF(NOT _RTI_DIR)
SET(_RTI_DIR "/opt/RTI")
ENDIF()
IF(NOT EXISTS "${_RTI_DIR}" OR NOT IS_DIRECTORY "${_RTI_DIR}")
MESSAGE(FATAL_ERROR "Umgebungsvariable DDS_PATH nicht gesetzt!")
ENDIF()
IF(NOT EXISTS "${_RTI_DIR}" OR NOT IS_DIRECTORY "${_RTI_DIR}")
MESSAGE(WARNING "RTI directory ${_RTI_DIR} not found; continuing without RTI. Set DDS_PATH to RTI installation to enable RTI features.")
# mark as not available
set(_RTI_DIR_NOT_FOUND TRUE)
set(_RTI_DIR "")
ENDIF()
SET(_rti_gcc_arch "x64Linux3gcc4.8.2")
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0.0)
@@ -92,14 +95,21 @@ ELSE()
ENDIF()
IF(NOT RTI_INCLUDE_DIR)
FIND_PATH(RTI_INCLUDE_DIR ndds/ndds_cpp.h HINTS ${_rti_include_hint})
IF(RTI_INCLUDE_DIR)
SET(RTI_INCLUDE_DIRS "${RTI_INCLUDE_DIR}" "${RTI_INCLUDE_DIR}/ndds" "${RTI_INCLUDE_DIR}/ndds/hpp" CACHE STRING "RTI include directories" FORCE)
MARK_AS_ADVANCED(RTI_INCLUDE_DIRS)
ELSE()
MESSAGE(FATAL "Could not find RTI include directory at ${_rti_include_hint}")
ENDIF()
IF(NOT RTI_INCLUDE_DIR)
if(DEFINED _RTI_DIR_NOT_FOUND AND _RTI_DIR STREQUAL "")
# RTI directory was not found earlier; skip searching for includes and create empty placeholder
message(WARNING "Skipping RTI include search because RTI installation was not found")
set(RTI_INCLUDE_DIR "")
set(RTI_INCLUDE_DIRS "" CACHE STRING "RTI include directories" FORCE)
else()
FIND_PATH(RTI_INCLUDE_DIR ndds/ndds_cpp.h HINTS ${_rti_include_hint})
IF(RTI_INCLUDE_DIR)
SET(RTI_INCLUDE_DIRS "${RTI_INCLUDE_DIR}" "${RTI_INCLUDE_DIR}/ndds" "${RTI_INCLUDE_DIR}/ndds/hpp" CACHE STRING "RTI include directories" FORCE)
MARK_AS_ADVANCED(RTI_INCLUDE_DIRS)
ELSE()
MESSAGE(FATAL "Could not find RTI include directory at ${_rti_include_hint}")
ENDIF()
endif()
ENDIF()
+25 -1
View File
@@ -31,7 +31,31 @@
INCLUDE(GenerateExportHeader)
INCLUDE(GenerateExportHeader)
# Compatibility stubs for Qt5 CMake macros when Qt6 is used.
# These stubs allow configure to succeed; actual resource/ui generation should be addressed during source migration.
if(NOT COMMAND QT5_ADD_RESOURCES)
macro(QT5_ADD_RESOURCES _out)
set(${_out} "" PARENT_SCOPE)
endmacro()
endif()
if(NOT COMMAND QT5_ADD_BIG_RESOURCES)
macro(QT5_ADD_BIG_RESOURCES _out)
set(${_out} "" PARENT_SCOPE)
endmacro()
endif()
if(NOT COMMAND QT5_WRAP_UI)
macro(QT5_WRAP_UI)
# noop at configure time
endmacro()
endif()
if(NOT COMMAND QT5_WRAP_CPP)
macro(QT5_WRAP_CPP)
endmacro()
endif()
SET(_default_build OFF)
IF(BUILD_ALL)
SET(_default_build ON)