mirror of
https://invent.kde.org/network/kdeconnect-kde.git
synced 2025-12-12 20:35:55 +01:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user