Compare commits

...

5 Commits

Author SHA1 Message Date
Nicolas Fella
52c5d2248f Fix nativeEventFilter signature when building against Qt6 2022-08-03 21:22:51 +02:00
Nicolas Fella
0ff18b64bc Fix includes for QX11Info when using Qt6 2022-08-03 21:20:32 +02:00
Nicolas Fella
7c367c0fac Adapt build system for building against Qt6 2022-08-03 21:19:35 +02:00
Nicolas Fella
6a4a925a2e Use correct KWallet include 2022-08-03 21:15:07 +02:00
Nicolas Fella
7b3a50e9bf Remove unused include 2022-08-03 21:14:34 +02:00
13 changed files with 63 additions and 25 deletions

View File

@@ -27,7 +27,11 @@ include(CheckIncludeFile)
check_include_file("linux/input.h" HAVE_LINUX_INPUT_H)
find_package(Qt5 ${QT_MIN_VERSION} REQUIRED COMPONENTS Core DBus Widgets X11Extras)
find_package(Qt${QT_MAJOR_VERSION} ${QT_MIN_VERSION} REQUIRED COMPONENTS Core DBus Widgets)
if(QT_MAJOR_VERSION EQUAL "5")
find_package(Qt5X11Extras REQUIRED)
endif()
find_package(KF5 ${KF5_MIN_VERSION} REQUIRED COMPONENTS
I18n
@@ -81,8 +85,8 @@ find_package(PlasmaWaylandProtocols 1.5.0)
if(PipeWire_FOUND AND PlasmaWaylandProtocols_FOUND)
find_package(KF5Wayland ${KF5_MIN_VERSION})
find_package(QtWaylandScanner REQUIRED)
find_package(Qt5WaylandClient)
find_package(Qt5XkbCommonSupport)
find_package(Qt${QT_MAJOR_VERSION}WaylandClient)
find_package(Qt${QT_MAJOR_VERSION}XkbCommonSupport)
find_package(Wayland REQUIRED COMPONENTS Client)
endif()

View File

@@ -22,7 +22,6 @@
#include "x11events.h"
#include <QApplication>
#include <QX11Info>
#include <QDesktopWidget>
#include <QGlobalStatic>
@@ -30,7 +29,11 @@
#include <X11/keysym.h>
#include <X11/extensions/XTest.h>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <QtGui/private/qtx11extras_p.h>
#endif
enum {
LEFTSHIFT = 1,

View File

@@ -22,7 +22,12 @@
#include "x11events.h"
#include <KPluginFactory>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <QtGui/private/qtx11extras_p.h>
#endif
K_PLUGIN_CLASS(X11EventsPlugin)

View File

@@ -7,7 +7,7 @@ set (krfb_events_xdp_SRCS
xdpeventsplugin.cpp
)
qt5_add_dbus_interface(
qt_add_dbus_interface(
krfb_events_xdp_SRCS
${CMAKE_SOURCE_DIR}/dbus/xdp_dbus_remotedesktop_interface.xml
xdp_dbus_remotedesktop_interface
@@ -18,7 +18,7 @@ add_library (krfb_events_xdp MODULE ${krfb_events_xdp_SRCS})
target_link_libraries (krfb_events_xdp
KF5::CoreAddons
KF5::I18n
Qt5::DBus
Qt::DBus
krfbprivate
)
set_target_properties(krfb_events_xdp PROPERTIES OUTPUT_NAME xdp)

View File

@@ -27,7 +27,6 @@
#include <linux/input.h>
#include <QApplication>
#include <QDesktopWidget>
#include <QGlobalStatic>
class EventData

View File

@@ -22,13 +22,13 @@ ecm_qt_declare_logging_category(krfb_framebuffer_pw_SRCS
EXPORT KRFB
)
qt5_add_dbus_interface(
qt_add_dbus_interface(
krfb_framebuffer_pw_SRCS
${CMAKE_SOURCE_DIR}/dbus/xdp_dbus_screencast_interface.xml
xdp_dbus_screencast_interface
)
qt5_add_dbus_interface(
qt_add_dbus_interface(
krfb_framebuffer_pw_SRCS
${CMAKE_SOURCE_DIR}/dbus/xdp_dbus_remotedesktop_interface.xml
xdp_dbus_remotedesktop_interface
@@ -41,9 +41,9 @@ add_library(krfb_framebuffer_pw
set_property(TARGET krfb_framebuffer_pw PROPERTY C_STANDARD 99)
target_link_libraries(krfb_framebuffer_pw
Qt5::Core
Qt5::Gui
Qt5::DBus
Qt::Core
Qt::Gui
Qt::DBus
KF5::CoreAddons
KF5::WaylandClient
Wayland::Client

View File

@@ -21,8 +21,8 @@ add_library(krfb_framebuffer_qt
)
target_link_libraries (krfb_framebuffer_qt
Qt5::Core
Qt5::Gui
Qt::Core
Qt::Gui
KF5::CoreAddons
krfbprivate
)

View File

@@ -18,8 +18,8 @@ ecm_qt_declare_logging_category(krfb_framebuffer_xcb_SRCS
add_library(krfb_framebuffer_xcb MODULE ${krfb_framebuffer_xcb_SRCS})
target_link_libraries (krfb_framebuffer_xcb
Qt5::Core
Qt5::Gui
Qt::Core
Qt::Gui
XCB::XCB
XCB::RENDER
XCB::SHAPE

View File

@@ -18,12 +18,16 @@
#include <sys/ipc.h>
#include <sys/shm.h>
#include <QX11Info>
#include <QCoreApplication>
#include <QGuiApplication>
#include <QScreen>
#include <QAbstractNativeEventFilter>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <QtGui/private/qtx11extras_p.h>
#endif
class KrfbXCBEventFilter: public QAbstractNativeEventFilter
{
@@ -31,7 +35,11 @@ public:
KrfbXCBEventFilter(XCBFrameBuffer *owner);
public:
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override;
#else
bool nativeEventFilter(const QByteArray &eventType, void *message, qintptr *result) override;
#endif
public:
int xdamageBaseEvent;
@@ -98,7 +106,11 @@ KrfbXCBEventFilter::KrfbXCBEventFilter(XCBFrameBuffer *owner):
bool KrfbXCBEventFilter::nativeEventFilter(const QByteArray &eventType,
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
void *message, long *result) {
#else
void *message, qintptr *result) {
#endif
Q_UNUSED(result); // "result" is only used on windows
if (xdamageBaseEvent == 0) return false; // no xdamage extension

View File

@@ -23,13 +23,18 @@ generate_export_header(krfbprivate BASE_NAME krfbprivate)
target_link_libraries (krfbprivate
Qt5::Core
Qt5::Widgets
Qt5::X11Extras
Qt::Core
Qt::Widgets
${X11_X11_LIB}
${LIBVNCSERVER_LIBRARIES}
)
if(QT_MAJOR_VERSION EQUAL "5")
target_link_libraries (krfbprivate Qt::X11Extras)
else()
target_link_libraries (krfbprivate Qt::GuiPrivate)
endif()
set_target_properties (krfbprivate PROPERTIES
VERSION 5
SOVERSION 5.0
@@ -80,7 +85,7 @@ ki18n_wrap_ui (krfb_UI_SRCS
ui/mainwidget.ui
)
qt5_add_resources(krfb_SRCS
qt_add_resources(krfb_SRCS
krfb.qrc
)
@@ -95,7 +100,7 @@ target_link_libraries (krfb
${X11_Xext_LIB}
${X11_X11_LIB}
${X11_Xdamage_LIB}
Qt5::Network
Qt::Network
KF5::CoreAddons
KF5::DBusAddons
KF5::DNSSD
@@ -135,8 +140,8 @@ add_executable(krfb-virtualmonitor main-virtualmonitor.cpp ${krfbvm_SRCS} ${krfb
rfbserver.cpp rfbclient.cpp rfbservermanager.cpp eventsmanager.cpp framebuffermanager.cpp sockethelpers.cpp)
target_link_libraries(krfb-virtualmonitor
krfbprivate
Qt5::Gui
Qt5::Network
Qt::Gui
Qt::Network
KF5::ConfigGui
KF5::CoreAddons
KF5::I18n

View File

@@ -30,7 +30,7 @@
#include <KLocalizedString>
#include <KUser>
#include <KStringHandler>
#include <KWallet/KWallet>
#include <KWallet>
#include <kdnssd_version.h>
#if KDNSSD_VERSION >= QT_VERSION_CHECK(5, 84, 0)

View File

@@ -30,7 +30,12 @@
#include <QPixmap>
#include <qwindowdefs.h>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <QtGui/private/qtx11extras_p.h>
#endif
#include <csignal>
#include <X11/extensions/XTest.h>

View File

@@ -24,7 +24,12 @@
#include <QApplication>
#include <QClipboard>
#include <QPointer>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QX11Info>
#else
#include <QtGui/private/qtx11extras_p.h>
#endif
struct RfbServer::Private
{