diff --git a/core/kdeconnectplugin.h b/core/kdeconnectplugin.h index 86accef0c..0dfc1bedb 100644 --- a/core/kdeconnectplugin.h +++ b/core/kdeconnectplugin.h @@ -9,17 +9,12 @@ #include #include -#include #include "device.h" #include "kdeconnectcore_export.h" #include "kdeconnectpluginconfig.h" #include "networkpacket.h" -#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 44, 0) -#define K_PLUGIN_CLASS_WITH_JSON(classname, jsonFile) K_PLUGIN_FACTORY_WITH_JSON(classname##Factory, jsonFile, registerPlugin();) -#endif - struct KdeConnectPluginPrivate; class KDECONNECTCORE_EXPORT KdeConnectPlugin : public QObject diff --git a/interfaces/pluginmodel.cpp b/interfaces/pluginmodel.cpp index 73dc7d8fb..ed7023b17 100644 --- a/interfaces/pluginmodel.cpp +++ b/interfaces/pluginmodel.cpp @@ -10,9 +10,6 @@ #include "kcoreaddons_version.h" #include -#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 86, 0) -#include -#endif PluginModel::PluginModel(QObject *parent) : QAbstractListModel(parent) @@ -21,11 +18,7 @@ PluginModel::PluginModel(QObject *parent) connect(this, &QAbstractItemModel::rowsRemoved, this, &PluginModel::rowsChanged); beginResetModel(); -#if KCOREADDONS_VERSION < QT_VERSION_CHECK(5, 84, 0) - m_plugins = KPluginLoader::findPlugins(QStringLiteral("kdeconnect/")); -#else m_plugins = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect/")); -#endif endResetModel(); } diff --git a/plugins/notifications/notification.cpp b/plugins/notifications/notification.cpp index 3c49abeb6..7564259ca 100644 --- a/plugins/notifications/notification.cpp +++ b/plugins/notifications/notification.cpp @@ -7,12 +7,9 @@ #include "notification.h" #include "plugin_notification_debug.h" -#include "knotifications_version.h" -#include -#if KNOTIFICATIONS_VERSION >= QT_VERSION_CHECK(5, 81, 0) -#include -#endif #include +#include +#include #include #include #include @@ -49,13 +46,6 @@ Notification::Notification(const NetworkPacket &np, const Device *device, QObjec createKNotification(np); connect(m_notification, &KNotification::activated, this, [this](unsigned int actionIndex) { -// Since 5.81 we use KNotification's inline reply instead of our own action -#if KNOTIFICATIONS_VERSION < QT_VERSION_CHECK(5, 81, 0) - // Do nothing for our own reply action - if (!m_requestReplyId.isEmpty() && actionIndex == 1) { - return; - } -#endif // Notification action indices start at 1 Q_EMIT actionTriggered(m_internalId, m_actions[actionIndex - 1]); }); @@ -120,17 +110,12 @@ void Notification::createKNotification(const NetworkPacket &np) m_notification->setHint(QStringLiteral("x-kde-origin-name"), m_device->name()); if (!m_requestReplyId.isEmpty()) { -#if KNOTIFICATIONS_VERSION >= QT_VERSION_CHECK(5, 81, 0) auto replyAction = std::make_unique(i18nc("@action:button", "Reply")); replyAction->setPlaceholderText(i18nc("@info:placeholder", "Reply to %1...", m_appName)); replyAction->setFallbackBehavior(KNotificationReplyAction::FallbackBehavior::UseRegularAction); QObject::connect(replyAction.get(), &KNotificationReplyAction::replied, this, &Notification::replied); QObject::connect(replyAction.get(), &KNotificationReplyAction::activated, this, &Notification::reply); m_notification->setReplyAction(std::move(replyAction)); -#else - m_actions.prepend(i18n("Reply")); - connect(m_notification, &KNotification::action1Activated, this, &Notification::reply, Qt::UniqueConnection); -#endif } m_notification->setActions(m_actions); diff --git a/plugins/runcommand/runcommandplugin.cpp b/plugins/runcommand/runcommandplugin.cpp index 6c566d586..4a0e13608 100644 --- a/plugins/runcommand/runcommandplugin.cpp +++ b/plugins/runcommand/runcommandplugin.cpp @@ -77,10 +77,7 @@ void RunCommandPlugin::sendConfig() { QString commands = config()->getString(QStringLiteral("commands"), QStringLiteral("{}")); NetworkPacket np(PACKET_TYPE_RUNCOMMAND, {{QStringLiteral("commandList"), commands}}); - -#if KCMUTILS_VERSION >= QT_VERSION_CHECK(5, 45, 0) np.set(QStringLiteral("canAddCommand"), true); -#endif sendPacket(np); }