summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <elvis.angelaccio@kde.org>2016-10-30 17:46:23 (GMT)
committerElvis Angelaccio <elvis.angelaccio@kde.org>2016-10-30 17:46:23 (GMT)
commite68ab2f61fbd09f7ba98a0182bd13cbbeb4bde48 (patch)
treea07886816fd3025bdcab592ccb6ffdb1fd7a5754
parent852ae737eee1877db32e93e0bafc710795a5e3ab (diff)
pluginmanager: always load the arkrc config file
If we don't specify the name of the config file to open, the name of the executable will be used, but this breaks when the class is used outside Ark (for example in the tests).
-rw-r--r--kerfuffle/pluginmanager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/kerfuffle/pluginmanager.cpp b/kerfuffle/pluginmanager.cpp
index 5bd2ba4..2cfeeb6 100644
--- a/kerfuffle/pluginmanager.cpp
+++ b/kerfuffle/pluginmanager.cpp
@@ -170,9 +170,11 @@ QVector<Plugin*> PluginManager::filterBy(const QVector<Plugin*> &plugins, const
void PluginManager::loadPlugins()
{
const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("kerfuffle"));
+ // This class might be used from executables other than ark (e.g. the tests),
+ // so we need to specify the name of the config file.
// TODO: once we have a GUI in the settings dialog,
// use this group to write whether a plugin gets disabled.
- const KConfigGroup conf(KSharedConfig::openConfig(), "EnabledPlugins");
+ const KConfigGroup conf(KSharedConfig::openConfig(QStringLiteral("arkrc")), "EnabledPlugins");
QSet<QString> addedPlugins;
foreach (const KPluginMetaData &metaData, plugins) {