From b6ec4b1c9e0c52ec369db513a6c539d24d8e2275 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau Date: Sat, 29 May 2021 20:24:47 +0200 Subject: [PATCH] Remove code path for loading deprecated VSC plugins 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. --- .../versioncontrol/versioncontrolobserver.cpp | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/src/views/versioncontrol/versioncontrolobserver.cpp b/src/views/versioncontrol/versioncontrolobserver.cpp index 175d362bc..9c18c6794 100644 --- a/src/views/versioncontrol/versioncontrolobserver.cpp +++ b/src/views/versioncontrol/versioncontrolobserver.cpp @@ -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(this); - if (plugin) { - m_plugins.append(plugin); - } - } - } - for (auto &plugin : qAsConst(m_plugins)) { connect(plugin, &KVersionControlPlugin::itemVersionsChanged, this, &VersionControlObserver::silentDirectoryVerification);