Commit 4df5c2ee authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Remove duplicate check code

parent 7dbbf4c9
Pipeline #66026 passed with stage
in 6 minutes and 22 seconds
......@@ -82,7 +82,6 @@ bool PluginManagerPrivate::initializePlugins()
QVectorIterator<KPluginMetaData> i(plugins);
i.toBack();
QSet<QString> unique;
while (i.hasPrevious()) {
ImportExportInfo info;
const KPluginMetaData data = i.previous();
......@@ -96,13 +95,8 @@ bool PluginManagerPrivate::initializePlugins()
info.metaDataFileNameBaseName = QFileInfo(data.fileName()).baseName();
info.metaDataFileName = data.fileName();
if (pluginVersion() == data.version()) {
// only load plugins once, even if found multiple times!
if (unique.contains(info.metaDataFileNameBaseName)) {
continue;
}
info.plugin = nullptr;
mPluginList.push_back(info);
unique.insert(info.metaDataFileNameBaseName);
} else {
qCWarning(LIBKADDRESSBOOKIMPORTEXPORT_LOG) << "Plugin " << data.name() << " doesn't have correction plugin version. It will not be loaded.";
}
......
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