Compare commits

...

10 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
Friedrich W. H. Kossebau
5173e7ff29 Port away from deprecated KMessageBox::about()
GIT_SILENT
2022-07-16 01:03:44 +02:00
Friedrich W. H. Kossebau
745a5d53f2 Use ECMDeprecationSettings
GIT_SILENT
2022-07-16 01:01:12 +02:00
Friedrich W. H. Kossebau
ce0d6fe648 Adapt min Qt version to one implied by current min KF version
GIT_SILENT
2022-07-16 00:59:26 +02:00
Friedrich W. H. Kossebau
42ed3c5707 Remove definitions duplicated from KDE_COMPILERSETTINGS_LEVEL 5.91
GIT_SILENT
2022-07-16 00:58:55 +02:00
Albert Astals Cid
2cd15b6313 GIT_SILENT Upgrade release service version to 22.11.70. 2022-07-13 00:04:53 +02:00
14 changed files with 76 additions and 48 deletions

View File

@@ -2,13 +2,13 @@ cmake_minimum_required(VERSION 3.16)
# KDE Application Version, managed by release script
set (RELEASE_SERVICE_VERSION_MAJOR "22")
set (RELEASE_SERVICE_VERSION_MINOR "07")
set (RELEASE_SERVICE_VERSION_MINOR "11")
set (RELEASE_SERVICE_VERSION_MICRO "70")
set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE_VERSION_MINOR}.${RELEASE_SERVICE_VERSION_MICRO}")
project(krfb VERSION ${RELEASE_SERVICE_VERSION})
set(QT_MIN_VERSION 5.15.0)
set(QT_MIN_VERSION 5.15.2)
set(KF5_MIN_VERSION 5.91.0)
find_package(ECM ${KF5_MIN_VERSION} NO_MODULE REQUIRED)
@@ -21,12 +21,17 @@ include(ECMInstallIcons)
include(ECMAddAppIcon)
include(ECMSetupVersion)
include(ECMQtDeclareLoggingCategory)
include(ECMDeprecationSettings)
include(FeatureSummary)
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
@@ -60,22 +65,11 @@ if(WIN32)
set(CMAKE_REQUIRED_INCLUDES ${KDEWIN32_INCLUDES})
endif(WIN32)
add_definitions(
-DQT_DEPRECATED_WARNINGS
-DQT_USE_QSTRINGBUILDER
-DQT_NO_CAST_TO_ASCII
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_CAST_FROM_BYTEARRAY
-DQT_STRICT_ITERATORS
-DQT_NO_URL_CAST_FROM_STRING
-DQT_NO_SIGNALS_SLOTS_KEYWORDS
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
ecm_set_disabled_deprecation_versions(
QT 5.15.2
KF 5.91
)
add_definitions(-DQT_DISABLE_DEPRECATED_BEFORE=0x050f02)
add_definitions(-DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x055A00)
include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} )
find_package(LibVNCServer REQUIRED)
@@ -91,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

@@ -33,7 +33,7 @@
#include <QSet>
#include <QNetworkInterface>
#include <QHostInfo>
#include <QMessageBox>
class TCP: public QWidget, public Ui::TCP
{
@@ -219,16 +219,16 @@ void MainWindow::passwordChanged(const QString& password)
void MainWindow::aboutConnectionAddress()
{
KMessageBox::about(this,
i18n("This field contains the address of your computer and the port number, separated by a colon.\n\nThe address is just a hint - you can use any address that can reach your computer.\n\nDesktop Sharing tries to guess your address from your network configuration, but does not always succeed in doing so.\n\nIf your computer is behind a firewall it may have a different address or be unreachable for other computers."),
i18n("KDE Desktop Sharing"));
QMessageBox::about(this,
i18n("KDE Desktop Sharing"),
i18n("This field contains the address of your computer and the port number, separated by a colon.\n\nThe address is just a hint - you can use any address that can reach your computer.\n\nDesktop Sharing tries to guess your address from your network configuration, but does not always succeed in doing so.\n\nIf your computer is behind a firewall it may have a different address or be unreachable for other computers."));
}
void MainWindow::aboutUnattendedMode()
{
KMessageBox::about(this,
i18n("Any remote user with normal desktop sharing password will have to be authenticated.\n\nIf unattended access is on, and the remote user provides unattended mode password, desktop sharing access will be granted without explicit confirmation."),
i18n("KDE Desktop Sharing"));
QMessageBox::about(this,
i18n("KDE Desktop Sharing"),
i18n("Any remote user with normal desktop sharing password will have to be authenticated.\n\nIf unattended access is on, and the remote user provides unattended mode password, desktop sharing access will be granted without explicit confirmation."));
}
void MainWindow::showConfiguration()

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
{