mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 09:50:12 +00:00
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.
This commit is contained in:
parent
9fc92e7b51
commit
b6ec4b1c9e
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue