diff --git a/plugins/mousepad/CMakeLists.txt b/plugins/mousepad/CMakeLists.txt index 63eb477f7..3a1cc4468 100644 --- a/plugins/mousepad/CMakeLists.txt +++ b/plugins/mousepad/CMakeLists.txt @@ -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() diff --git a/plugins/mousepad/x11remoteinput.cpp b/plugins/mousepad/x11remoteinput.cpp index d81845680..5cd95664a 100644 --- a/plugins/mousepad/x11remoteinput.cpp +++ b/plugins/mousepad/x11remoteinput.cpp @@ -9,7 +9,11 @@ #include #include +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #include +#else +#include +#endif #include #include diff --git a/plugins/notifications/CMakeLists.txt b/plugins/notifications/CMakeLists.txt index 8704704bf..246a3292c 100644 --- a/plugins/notifications/CMakeLists.txt +++ b/plugins/notifications/CMakeLists.txt @@ -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() diff --git a/plugins/notifications/notificationsplugin.cpp b/plugins/notifications/notificationsplugin.cpp index ccbb9a56e..fab255cf3 100644 --- a/plugins/notifications/notificationsplugin.cpp +++ b/plugins/notifications/notificationsplugin.cpp @@ -14,7 +14,11 @@ #include #if !defined(Q_OS_WIN) && !defined(Q_OS_MAC) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #include +#else +#include +#endif #endif K_PLUGIN_CLASS_WITH_JSON(NotificationsPlugin, "kdeconnect_notifications.json") diff --git a/plugins/virtualmonitor/virtualmonitorplugin.cpp b/plugins/virtualmonitor/virtualmonitorplugin.cpp index e845aa31e..86db27e93 100644 --- a/plugins/virtualmonitor/virtualmonitorplugin.cpp +++ b/plugins/virtualmonitor/virtualmonitorplugin.cpp @@ -14,6 +14,7 @@ #include #include #include +#include K_PLUGIN_CLASS_WITH_JSON(VirtualMonitorPlugin, "kdeconnect_virtualmonitor.json") #define QS QLatin1String