diff --git a/core/pluginloader.cpp b/core/pluginloader.cpp index 9115bf766..1ff1be45b 100644 --- a/core/pluginloader.cpp +++ b/core/pluginloader.cpp @@ -69,7 +69,7 @@ KdeConnectPlugin *PluginLoader::instantiatePluginForDevice(const QString &plugin QStringList PluginLoader::incomingCapabilities() const { QSet ret; - for (const KPluginMetaData &service : qAsConst(plugins)) { + for (const KPluginMetaData &service : plugins) { QStringList rawValues = service.value(QStringLiteral("X-KdeConnect-SupportedPacketType"), QStringList()); ret += QSet(rawValues.begin(), rawValues.end()); } @@ -79,20 +79,20 @@ QStringList PluginLoader::incomingCapabilities() const QStringList PluginLoader::outgoingCapabilities() const { QSet ret; - for (const KPluginMetaData &service : qAsConst(plugins)) { + for (const KPluginMetaData &service : plugins) { QStringList rawValues = service.value(QStringLiteral("X-KdeConnect-OutgoingPacketType"), QStringList()); ret += QSet(rawValues.begin(), rawValues.end()); } return ret.values(); } -QSet PluginLoader::pluginsForCapabilities(const QSet &incoming, const QSet &outgoing) +QSet PluginLoader::pluginsForCapabilities(const QSet &incoming, const QSet &outgoing) const { QSet ret; QString myDeviceType = KdeConnectConfig::instance().deviceType().toString(); - for (const KPluginMetaData &service : qAsConst(plugins)) { + for (const KPluginMetaData &service : plugins) { // Check if the plugin support this device type const QStringList supportedDeviceTypes = service.rawData().value(QStringLiteral("X-KdeConnect-SupportedDeviceTypes")).toVariant().toStringList(); if (!supportedDeviceTypes.isEmpty()) { diff --git a/core/pluginloader.h b/core/pluginloader.h index b49c79a89..0a9a9fbb9 100644 --- a/core/pluginloader.h +++ b/core/pluginloader.h @@ -31,7 +31,7 @@ public: QStringList incomingCapabilities() const; QStringList outgoingCapabilities() const; - QSet pluginsForCapabilities(const QSet &incoming, const QSet &outgoing); + QSet pluginsForCapabilities(const QSet &incoming, const QSet &outgoing) const; private: PluginLoader();