Reduce compiler warnings: replace qAsConst with std::as_const and update event localPos() to position()

Replaced deprecated qAsConst usages in built modules and updated QMouseEvent::localPos() to position() per Qt6 deprecation guidance.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torsten committed 2026-07-14 22:44:14 +02:00
1 parent 46e673f660
commit 8af436f09a
281 files changed
+7102 -5490

No files matched your search

+38 -7
View File
@@ -45,9 +45,29 @@ if(NOT _poppler_version_bad)
set(POPPLER_QT5_FOUND FALSE)
# 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}
)
# Attempt to use pkg-config-provided absolute library path variable if available
if(_pc_poppler_FOUND)
# construct the variable name pkgcfg_lib__pc_poppler_<pkgname>
set(_pkg_var "pkgcfg_lib__pc_poppler_${_pc_poppler_pkgname}")
message(STATUS "FindPoppler: pkg-config found ${_pc_poppler_pkgname}, var ${_pkg_var} defined? ${${_pkg_var}}")
if(DEFINED ${_pkg_var})
set(POPPLER_QT5_LIBRARY ${${_pkg_var}})
message(STATUS "FindPoppler: using pkgcfg path ${POPPLER_QT5_LIBRARY}")
endif()
endif()
if(NOT POPPLER_QT5_LIBRARY)
find_library(POPPLER_QT5_LIBRARY ${_pc_poppler_pkgname}
HINTS ${_pc_poppler_LIBRARY_DIRS}
)
endif()
# fallback: try common library names if pkg-config hints didn't help
if(NOT POPPLER_QT5_LIBRARY)
find_library(POPPLER_QT5_LIBRARY NAMES poppler-qt6 poppler-qt5)
endif()
# extra fallback paths commonly used on Debian/Ubuntu
if(NOT POPPLER_QT5_LIBRARY)
find_library(POPPLER_QT5_LIBRARY NAMES poppler-qt6 poppler-qt5 PATHS /usr/lib/x86_64-linux-gnu /usr/lib /usr/local/lib)
endif()
# check for headers for both qt5 and qt6 layouts
find_path(POPPLER_QT5_INCLUDE_DIR poppler-qt6.h poppler-qt5.h
@@ -59,10 +79,21 @@ if(NOT _poppler_version_bad)
PATH_SUFFIXES poppler
)
if(POPPLER_QT5_LIBRARY AND POPPLER_QT5_INCLUDE_DIR AND POPPLER_QT5_INCLUDE_DIR_core)
list(APPEND POPPLER_QT5_INCLUDE_DIR "${POPPLER_QT5_INCLUDE_DIR_core}")
set(POPPLER_QT5_FOUND TRUE)
endif(POPPLER_QT5_LIBRARY AND POPPLER_QT5_INCLUDE_DIR AND POPPLER_QT5_INCLUDE_DIR_core)
if(POPPLER_QT5_LIBRARY AND POPPLER_QT5_INCLUDE_DIR AND POPPLER_QT5_INCLUDE_DIR_core)
list(APPEND POPPLER_QT5_INCLUDE_DIR "${POPPLER_QT5_INCLUDE_DIR_core}")
set(POPPLER_QT5_FOUND TRUE)
# Expose a modern imported target for consumers
if(NOT TARGET PopplerQt5::Poppler)
add_library(PopplerQt5::Poppler UNKNOWN IMPORTED)
set_target_properties(PopplerQt5::Poppler PROPERTIES
IMPORTED_LOCATION "${POPPLER_QT5_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${POPPLER_QT5_INCLUDE_DIR}"
)
endif()
# Also cache the library path so other CMakeLists can link directly
set(POPPLER_QT5_LIBRARY "${POPPLER_QT5_LIBRARY}" CACHE FILEPATH "Path to poppler-qt library")
set(POPPLER_QT5_INCLUDE_DIR "${POPPLER_QT5_INCLUDE_DIR}" CACHE PATH "Poppler include dirs")
endif(POPPLER_QT5_LIBRARY AND POPPLER_QT5_INCLUDE_DIR AND POPPLER_QT5_INCLUDE_DIR_core)
endif(NOT _poppler_version_bad)
if(POPPLER_QT5_LIBRARY AND POPPLER_QT5_INCLUDE_DIR)
+12
View File
@@ -55,6 +55,18 @@ if(NOT COMMAND QT5_WRAP_CPP)
endmacro()
endif()
# NGL_WRAP_UI: ensure .ui files are added to source lists so CMake's AUTOUIC can process them
if(NOT COMMAND NGL_WRAP_UI)
macro(NGL_WRAP_UI _out)
# Append provided UI files to the given source list variable
set(_cur "${${_out}}")
foreach(_ui ${ARGN})
list(APPEND _cur ${_ui})
endforeach()
set(${_out} "${_cur}" PARENT_SCOPE)
endmacro()
endif()
SET(_default_build OFF)
IF(BUILD_ALL)