Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAddressBook
Commits
4df5c2ee
Commit
4df5c2ee
authored
Jun 16, 2021
by
Laurent Montel
😁
Browse files
Remove duplicate check code
parent
7dbbf4c9
Pipeline
#66026
passed with stage
in 6 minutes and 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/importexport/pluginmanager.cpp
View file @
4df5c2ee
...
...
@@ -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."
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment