From 5a11df5d7cfe455130de1eeecfd88ffbfd0368bd Mon Sep 17 00:00:00 2001 From: David Redondo Date: Tue, 2 Jul 2024 11:43:40 +0200 Subject: [PATCH] Dont show hidden plugins in settings This will be used by the receiving end of the share input devices functionality. It uses the mousepadplugin for remote input so it makes sense to not have to configure it separately and only have one user visible "Allow remote control" option. --- interfaces/pluginmodel.cpp | 2 +- kcm/kcm.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/interfaces/pluginmodel.cpp b/interfaces/pluginmodel.cpp index 26c50d03c..652c36558 100644 --- a/interfaces/pluginmodel.cpp +++ b/interfaces/pluginmodel.cpp @@ -16,7 +16,7 @@ PluginModel::PluginModel(QObject *parent) { connect(this, &QAbstractItemModel::rowsInserted, this, &PluginModel::rowsChanged); connect(this, &QAbstractItemModel::rowsRemoved, this, &PluginModel::rowsChanged); - m_plugins = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect")); + m_plugins = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect"), std::not_fn(&KPluginMetaData::isHidden)); } PluginModel::~PluginModel() diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp index 886c8cac6..8519cd5ee 100644 --- a/kcm/kcm.cpp +++ b/kcm/kcm.cpp @@ -190,7 +190,7 @@ void KdeConnectKcm::resetDeviceView() }, this); - const QVector pluginInfo = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect")); + const QVector pluginInfo = KPluginMetaData::findPlugins(QStringLiteral("kdeconnect"), std::not_fn(&KPluginMetaData::isHidden)); QVector availablePluginInfo; m_oldSupportedPluginNames = currentDevice->supportedPlugins();