summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-09-08 05:46:52 (GMT)
committerMontel Laurent <montel@kde.org>2016-09-08 05:46:52 (GMT)
commit2a1649f09aa5b8df4f5efab574d4ca4de19113fa (patch)
tree86dc19c2e92d9316931165adf037d7bcfdc23c97
parentea44df6f2c7833a4d5d2cff76a92925f08273d1d (diff)
Use PimCommon::PluginUtil::isPluginActivated
-rw-r--r--src/genericplugins/genericpluginmanager.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/genericplugins/genericpluginmanager.cpp b/src/genericplugins/genericpluginmanager.cpp
index 31ecdbf..2a7f929 100644
--- a/src/genericplugins/genericpluginmanager.cpp
+++ b/src/genericplugins/genericpluginmanager.cpp
@@ -18,6 +18,7 @@
#include "genericplugin.h"
#include "genericpluginmanager.h"
#include "pimcommon_debug.h"
+#include "pluginutil.h"
#include <kpluginmetadata.h>
#include <KPluginLoader>
@@ -136,10 +137,8 @@ bool GenericPluginManagerPrivate::initializePlugins()
pluginData.mEnableByDefault = info.metaData.isEnabledByDefault();
mPluginDataList.append(pluginData);
- const bool pluginEnabledByUser = enabledPlugins.contains(info.metaData.pluginId());
- const bool pluginDisabledByUser = disabledPlugins.contains(info.metaData.pluginId());
- if ((info.metaData.isEnabledByDefault() && !pluginDisabledByUser)
- || (!info.metaData.isEnabledByDefault() && pluginEnabledByUser)) {
+ const bool isPluginActivated = PimCommon::PluginUtil::isPluginActivated(enabledPlugins, disabledPlugins, pluginData.mEnableByDefault, pluginData.mIdentifier);
+ if (isPluginActivated) {
if (pluginVersion() == info.metaData.version()) {
// only load plugins once, even if found multiple times!
if (unique.contains(info.saveName())) {