Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 68d0c5d1 authored by Nicolas Fella's avatar Nicolas Fella

Do not require Frameworks 5.45

Summary: Ifdef for old KF5 as discussed in D11684.

Test Plan: Can still use feature when above 5.45

Reviewers: apol

Reviewed By: apol

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12810
parent c6ebdbe8
......@@ -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)
......
......@@ -35,6 +35,7 @@
#include <KPluginFactory>
#include <KAboutData>
#include <KLocalizedString>
#include <kcmutils_version.h>
#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()
......
......@@ -29,6 +29,7 @@
#include <QSettings>
#include <QJsonDocument>
#include <KShell>
#include <kcmutils_version.h>
#include <core/networkpacket.h>
#include <core/device.h>
......@@ -85,7 +86,11 @@ void RunCommandPlugin::sendConfig()
{
QString commands = config()->get<QString>(QStringLiteral("commands"),QStringLiteral("{}"));
NetworkPacket np(PACKET_TYPE_RUNCOMMAND, {{"commandList", commands}});
np.set<bool>(QStringLiteral("canAddCommand"), true);
#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 45, 0)
np.set<bool>(QStringLiteral("canAddCommand"), true);
#endif
sendPacket(np);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment