summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <[email protected]>2018-11-07 16:33:31 +0000
committerDavid Edmundson <[email protected]>2018-11-07 16:33:44 +0000
commit7b1b27fa8ef3b19cc5e6898efaf6cc7566adf399 (patch)
tree92797ebfb156df4bd4d53633eb6cc9f849e56a5f
parent98d38f9ffb607cebe439a5a8f9ed8e464db417c0 (diff)
Avoid needless config parse
Summary: There's practically no reason to ever open kdeglobals. The way the kde cascading configuration system works is that we'll have those settings included in our plasmashellrc which we've already loaded. Not only is it faster but we also honour any kdeglobals setting overrides from /etc/ . Test Plan: Changed setting in kdeglobals Setting still applied Reviewers: #plasma, hein, apol Reviewed By: apol Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D16384
-rw-r--r--containments/desktop/plugins/folder/foldermodel.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/containments/desktop/plugins/folder/foldermodel.cpp b/containments/desktop/plugins/folder/foldermodel.cpp
index 76924f2..8079e2c 100644
--- a/containments/desktop/plugins/folder/foldermodel.cpp
+++ b/containments/desktop/plugins/folder/foldermodel.cpp
@@ -1792,8 +1792,7 @@ void FolderModel::openContextMenu(QQuickItem *visualParent, Qt::KeyboardModifier
menu->addAction(m_actionCollection.action(QStringLiteral("rename")));
menu->addAction(m_actionCollection.action(QStringLiteral("restoreFromTrash")));
- KSharedConfig::Ptr globalConfig = KSharedConfig::openConfig(QStringLiteral("kdeglobals"), KConfig::NoGlobals);
- KConfigGroup cg(globalConfig, "KDE");
+ KConfigGroup cg(KSharedConfig::openConfig(), "KDE");
bool showDeleteCommand = cg.readEntry("ShowDeleteCommand", false);
menu->addAction(m_actionCollection.action(QStringLiteral("emptyTrash")));