Commit 2e6c16d3 authored by Laurent Montel's avatar Laurent Montel
Browse files

Prepare using Qt6::GuiPrivate for QX11Info

parent 0e56d11d
Pipeline #143351 passed with stage
in 1 minute and 24 seconds
......@@ -72,8 +72,11 @@ set_package_properties(X11 PROPERTIES DESCRIPTION "X11 libraries"
)
if(X11_FOUND)
if (QT_MAJOR_VERSION STREQUAL "5")
find_package(Qt5X11Extras REQUIRED)
find_package(Qt5X11Extras REQUIRED)
elseif (QT_MAJOR_VERSION STREQUAL "6")
find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} CONFIG REQUIRED Gui) # qtx11extras_p.h
endif()
set(HAVE_X11 1)
find_library(X11_XRes_LIB XRes ${X11_LIB_SEARCH_PATH})
find_path(X11_XRes_INCLUDE_PATH X11/extensions/XRes.h ${X11_INC_SEARCH_PATH})
......
......@@ -55,10 +55,11 @@ target_include_directories(processui
"$<BUILD_INTERFACE:${libksysguard_SOURCE_DIR}>"
"$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/ksysguard>"
)
if(X11_FOUND)
if (QT_MAJOR_VERSION STREQUAL "5")
target_link_libraries(processui PRIVATE Qt::X11Extras KF5::WindowSystem)
else()
target_link_libraries(processui PRIVATE Qt6::GuiPrivate KF5::WindowSystem)
endif()
endif()
......
......@@ -24,7 +24,11 @@
#include <kuser.h>
#if HAVE_X11
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
#include <private/qtx11extras_p.h>
#else
#include <QX11Info>
#endif
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <fixx11h.h>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment