diff --git a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,7 @@ 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 --- 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 @@ 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 @@ disconnect(devicesModel, &DevicesModel::rowsInserted, this, nullptr); }); } + + #endif } void KdeConnectKcm::renameShow() diff --git a/plugins/runcommand/runcommandplugin.cpp b/plugins/runcommand/runcommandplugin.cpp --- a/plugins/runcommand/runcommandplugin.cpp +++ b/plugins/runcommand/runcommandplugin.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -85,7 +86,11 @@ { 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); }