Adjust includes/linking for QX11Extras

This commit is contained in:
Alexander Lohnau 2023-04-16 09:57:30 +02:00
parent a5560dafe6
commit 4e7764f328
5 changed files with 17 additions and 4 deletions

View file

@ -42,6 +42,8 @@ if(WITH_X11)
target_sources(kdeconnect_mousepad PUBLIC x11remoteinput.cpp)
if (QT_MAJOR_VERSION EQUAL "5")
target_link_libraries(kdeconnect_mousepad Qt5::X11Extras)
elseif(QT_MAJOR_VERSION EQUAL "6")
target_link_libraries(kdeconnect_mousepad Qt6::GuiPrivate)
endif()
target_link_libraries(kdeconnect_mousepad ${X11_LIBRARIES} ${XTEST_LIBRARIES} ${LibFakeKey_LIBRARIES})
endif()

View file

@ -9,7 +9,11 @@
#include <QCursor>
#include <QDebug>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <private/qtx11extras_p.h>
#endif
#include <X11/extensions/XTest.h>
#include <X11/keysym.h>

View file

@ -24,8 +24,10 @@ target_link_libraries(kdeconnect_notifications
KF${QT_MAJOR_VERSION}::WindowSystem
)
if (UNIX AND NOT APPLE AND QT_MAJOR_VERSION EQUAL "5")
target_link_libraries(kdeconnect_notifications
Qt5::X11Extras
)
if (UNIX AND NOT APPLE)
if (QT_MAJOR_VERSION EQUAL "5")
target_link_libraries(kdeconnect_notifications Qt5::X11Extras)
else()
target_link_libraries(kdeconnect_notifications Qt6::GuiPrivate)
endif()
endif()

View file

@ -14,7 +14,11 @@
#include <KStartupInfo>
#if !defined(Q_OS_WIN) && !defined(Q_OS_MAC)
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <private/qtx11extras_p.h>
#endif
#endif
K_PLUGIN_CLASS_WITH_JSON(NotificationsPlugin, "kdeconnect_notifications.json")

View file

@ -14,6 +14,7 @@
#include <QJsonArray>
#include <QProcess>
#include <QScreen>
#include <QStandardPaths>
K_PLUGIN_CLASS_WITH_JSON(VirtualMonitorPlugin, "kdeconnect_virtualmonitor.json")
#define QS QLatin1String