]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Remove code path for loading deprecated VSC plugins
authorAlexander Lohnau <alexander.lohnau@gmx.de>
Sat, 29 May 2021 18:24:47 +0000 (20:24 +0200)
committerAlexander Lohnau <alexander.lohnau@gmx.de>
Mon, 31 May 2021 07:02:16 +0000 (07:02 +0000)
In case there are custom, old plugin lying around they can't be loaded
anyways, because the version does not match. In case that gets fixed one
could just port the plugin to JSON metadata.

Also the mechanism that is used is about to be deprecated.

src/views/versioncontrol/versioncontrolobserver.cpp

index 175d362bc5528c5a5e30a79d0c7b45e340550fca..9c18c67949bc1821fc9df762fc87bbb8869728c0 100644 (file)
@@ -297,27 +297,6 @@ void VersionControlObserver::initPlugins()
             }
         }
 
-        // Deprecated: load plugins using KService. This mechanism will be removed with KF6
-        const KService::List pluginServices = KServiceTypeTrader::self()->query(QStringLiteral("FileViewVersionControlPlugin"));
-        for (KService::List::ConstIterator it = pluginServices.constBegin(); it != pluginServices.constEnd(); ++it) {
-            if (loadedPlugins.contains((*it)->property("Name", QVariant::String).toString())) {
-                continue;
-            }
-            if (enabledPlugins.contains((*it)->name())) {
-                KPluginLoader pluginLoader(*(*it));
-                // Need to cast to int, because pluginVersion() returns -1 as
-                // an unsigned int for plugins without versions.
-                if (int(pluginLoader.pluginVersion()) < 2) {
-                    qCWarning(DolphinDebug) << "Can't load old plugin" << (*it)->name();
-                    continue;
-                }
-                KVersionControlPlugin* plugin = (*it)->createInstance<KVersionControlPlugin>(this);
-                if (plugin) {
-                    m_plugins.append(plugin);
-                }
-            }
-        }
-
         for (auto &plugin : qAsConst(m_plugins)) {
             connect(plugin, &KVersionControlPlugin::itemVersionsChanged,
                 this, &VersionControlObserver::silentDirectoryVerification);