diff --git a/CMakeLists.txt b/CMakeLists.txt index 499f6452d..3e4fed27c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ set(KDECONNECT_VERSION_PATCH 0) set(KDECONNECT_VERSION "${KDECONNECT_VERSION_MAJOR}.${KDECONNECT_VERSION_MINOR}.${KDECONNECT_VERSION_PATCH}") set(QT_MIN_VERSION "5.7.0") -set(KF5_MIN_VERSION "5.45.0") +set(KF5_MIN_VERSION "5.42.0") find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_SOURCE_DIR}/cmake) diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index 9e59719e7..2d6411b49 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include "ui_kcm.h" #include "interfaces/dbusinterfaces.h" @@ -116,6 +117,8 @@ KdeConnectKcm::KdeConnectKcm(QWidget* parent, const QVariantList& args) daemon->acquireDiscoveryMode(createId()); + #if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 45, 0) + if (!args.isEmpty() && args.first().type() == QVariant::String) { const QString input = args.first().toString(); const auto colonIdx = input.indexOf(QLatin1Char(':')); @@ -134,6 +137,8 @@ KdeConnectKcm::KdeConnectKcm(QWidget* parent, const QVariantList& args) disconnect(devicesModel, &DevicesModel::rowsInserted, this, nullptr); }); } + + #endif } void KdeConnectKcm::renameShow() diff --git a/plugins/runcommand/runcommandplugin.cpp b/plugins/runcommand/runcommandplugin.cpp index 482501e46..c5f24e052 100644 --- a/plugins/runcommand/runcommandplugin.cpp +++ b/plugins/runcommand/runcommandplugin.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -85,7 +86,11 @@ void RunCommandPlugin::sendConfig() { QString commands = config()->get(QStringLiteral("commands"),QStringLiteral("{}")); NetworkPacket np(PACKET_TYPE_RUNCOMMAND, {{"commandList", commands}}); - np.set(QStringLiteral("canAddCommand"), true); + + #if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 45, 0) + np.set(QStringLiteral("canAddCommand"), true); + #endif + sendPacket(np); }