Commit f334a736 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark Committed by Elvis Angelaccio
Browse files

Check the version of the plugins before trying to load them

parent 30371aed
Pipeline #56548 passed with stage
in 7 minutes and 3 seconds
......@@ -304,6 +304,13 @@ void VersionControlObserver::initPlugins()
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment