diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}") -set (KF_MIN_VERSION "5.18.0") +set (KF_MIN_VERSION "5.25.0") find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${ECM_MODULE_PATH}) @@ -31,6 +31,7 @@ Completion Wallet WidgetsAddons + WindowSystem NotifyConfig I18n ) diff --git a/rdp/CMakeLists.txt b/rdp/CMakeLists.txt --- a/rdp/CMakeLists.txt +++ b/rdp/CMakeLists.txt @@ -27,6 +27,7 @@ Qt5::Gui KF5::ConfigCore KF5::CoreAddons + KF5::WindowSystem KF5::XmlGui krdccore ) diff --git a/rdp/rdpview.cpp b/rdp/rdpview.cpp --- a/rdp/rdpview.cpp +++ b/rdp/rdpview.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -362,7 +363,12 @@ connect(m_process, SIGNAL(finished(int,QProcess::ExitStatus)), SLOT(connectionClosed())); connect(m_process, SIGNAL(started()), SLOT(connectionOpened())); - m_process->start(QStringLiteral("xfreerdp"), arguments); + if (KWindowSystem::platform() == KWindowSystem::Platform::Wayland) { + m_process->start(QStringLiteral("wlfreerdp"), arguments); + } + else { + m_process->start(QStringLiteral("xfreerdp"), arguments); + } return true; } @@ -429,7 +435,16 @@ if (m_status == Connecting) { if (error == QProcess::FailedToStart) { - connectionError(i18n("Could not start \"xfreerdp\"; make sure xfreerdp is properly installed."), + QString executable; + switch (KWindowSystem::platform()) { + case KWindowSystem::Platform::Wayland: + executable = QStringLiteral("wlfreerdp"); + break; + case KWindowSystem::Platform::X11: + case KWindowSystem::Platform::Unknown: + executable = QStringLiteral("xfreerdp"); + } + connectionError(i18n("Could not start \"%1\"; make sure %1 is properly installed.", executable), i18n("RDP Failure")); return; }