Commit 7b1b27fa authored by David Edmundson's avatar David Edmundson

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
parent 98d38f9f
......@@ -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")));
......
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