Changeset View
Changeset View
Standalone View
Standalone View
src/core/kprotocolinfofactory.cpp
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Line(s) | 97 | if (!m_cacheDirty) { | |||
---|---|---|---|---|---|
98 | return false; | 98 | return false; | ||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | qDeleteAll(m_cache); | 101 | qDeleteAll(m_cache); | ||
102 | m_cache.clear(); | 102 | m_cache.clear(); | ||
103 | 103 | | |||
104 | // first: search for meta data protocol info, that might be bundled with applications | 104 | // first: search for meta data protocol info, that might be bundled with applications | ||
105 | // we search in all library paths inside kf5/kio | 105 | // we search in all library paths inside kf5/kio | ||
106 | Q_FOREACH (const KPluginMetaData &md, KPluginLoader::findPlugins(QStringLiteral("kf5/kio"))) { | 106 | const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kf5/kio")); | ||
107 | for (const KPluginMetaData &md : plugins) { | ||||
107 | // get slave name & protocols it supports, if any | 108 | // get slave name & protocols it supports, if any | ||
108 | const QString slavePath = md.fileName(); | 109 | const QString slavePath = md.fileName(); | ||
109 | const QJsonObject protocols(md.rawData().value(QStringLiteral("KDE-KIO-Protocols")).toObject()); | 110 | const QJsonObject protocols(md.rawData().value(QStringLiteral("KDE-KIO-Protocols")).toObject()); | ||
110 | qCDebug(KIO_CORE) << slavePath << "supports protocols" << protocols.keys(); | 111 | qCDebug(KIO_CORE) << slavePath << "supports protocols" << protocols.keys(); | ||
111 | 112 | | |||
112 | // add all protocols, does nothing if object invalid | 113 | // add all protocols, does nothing if object invalid | ||
113 | for (auto it = protocols.begin(); it != protocols.end(); ++it) { | 114 | for (auto it = protocols.begin(); it != protocols.end(); ++it) { | ||
114 | // skip empty objects | 115 | // skip empty objects | ||
Show All 33 Lines |