┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinitemlistview.cpp
diff options
context:
space:
mode:
authorNathaniel Graham <[email protected]>2017-11-16 07:23:46 -0700
committerNathaniel Graham <[email protected]>2017-11-16 08:51:09 -0700
commite60e3f07cf00823efdde3855cda0dfce36e74c52 (patch)
tree71fefb96ebecb6de9de04f3612d39d0e6a0c0a72 /src/views/dolphinitemlistview.cpp
parentbebcf035d264410c943e7bad861628c1b14dd1f2 (diff)
Use KConfig::readEntry()'s default argument properly
Summary: Follow-on patch to D7440 to use KConfig::readEntry()'s default argument properly to reduce some unnecessary code Test Plan: Tested in KDE Neon. no regressions; by default, all plugins are enabled if the key is not set, and if it is set, user changes to the list are remembered Reviewers: #dolphin, elvisangelaccio, dfaure, apol Reviewed By: #dolphin, elvisangelaccio, apol Differential Revision: https://phabricator.kde.org/D8846
Diffstat (limited to 'src/views/dolphinitemlistview.cpp')
-rw-r--r--src/views/dolphinitemlistview.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/views/dolphinitemlistview.cpp b/src/views/dolphinitemlistview.cpp
index d73889fd5..a1472c661 100644
--- a/src/views/dolphinitemlistview.cpp
+++ b/src/views/dolphinitemlistview.cpp
@@ -95,11 +95,7 @@ void DolphinItemListView::readSettings()
updateGridSize();
const KConfigGroup globalConfig(KSharedConfig::openConfig(), "PreviewSettings");
- QStringList enabledPlugins = globalConfig.readEntry("Plugins", QStringList());
- if (enabledPlugins.isEmpty()) {
- enabledPlugins = KIO::PreviewJob::defaultPlugins();
- }
- setEnabledPlugins(enabledPlugins);
+ setEnabledPlugins(globalConfig.readEntry("Plugins", KIO::PreviewJob::defaultPlugins()));
endTransaction();
}