┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/settings
diff options
context:
space:
mode:
authorEmmanuel Pescosta <[email protected]>2015-01-30 13:08:35 +0100
committerEmmanuel Pescosta <[email protected]>2015-01-31 21:05:28 +0100
commitfdb5c0d33e38e9d5fedc821c586bbb5ca8a0d2a5 (patch)
tree8da01f73b40454700896ff16a1e1d4da3d32f57d /src/settings
parent6d0f2554cbe4bce3f1bb3b01215f8bbc998be34d (diff)
Port away from KGlobalSettings::naturalSorting() by moving it to Dolphin's GeneralSettings
REVIEW: 122310
Diffstat (limited to 'src/settings')
-rw-r--r--src/settings/dolphin_generalsettings.kcfg6
-rw-r--r--src/settings/general/behaviorsettingspage.cpp10
2 files changed, 8 insertions, 8 deletions
diff --git a/src/settings/dolphin_generalsettings.kcfg b/src/settings/dolphin_generalsettings.kcfg
index 3c820e28e..2f230bf51 100644
--- a/src/settings/dolphin_generalsettings.kcfg
+++ b/src/settings/dolphin_generalsettings.kcfg
@@ -8,6 +8,7 @@
<include>QUrl</include>
<include>kglobalsettings.h</include>
<kcfgfile name="dolphinrc"/>
+ <signal name="naturalSortingChanged" />
<group name="General">
<entry name="EditableUrl" type="Bool">
<label>Should the URL be editable for the user</label>
@@ -92,5 +93,10 @@
<label>Enlarge Small Previews</label>
<default>true</default>
</entry>
+ <entry name="NaturalSorting" type="Bool">
+ <label>Natural sorting of items</label>
+ <default>true</default>
+ <emit signal="naturalSortingChanged" />
+ </entry>
</group>
</kcfg>
diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp
index 83515beb0..093a1f4e1 100644
--- a/src/settings/general/behaviorsettingspage.cpp
+++ b/src/settings/general/behaviorsettingspage.cpp
@@ -97,6 +97,7 @@ void BehaviorSettingsPage::applySettings()
settings->setShowToolTips(m_showToolTips->isChecked());
settings->setShowSelectionToggle(m_showSelectionToggle->isChecked());
+ settings->setNaturalSorting(m_naturalSorting->isChecked());
settings->setRenameInline(m_renameInline->isChecked());
settings->save();
@@ -108,13 +109,6 @@ void BehaviorSettingsPage::applySettings()
ViewProperties globalProps(m_url);
globalProps.setDirProperties(props);
}
-
- const bool naturalSorting = m_naturalSorting->isChecked();
- if (KGlobalSettings::naturalSorting() != naturalSorting) {
- KConfigGroup group(KSharedConfig::openConfig(), "KDE");
- group.writeEntry("NaturalSorting", naturalSorting, KConfig::Persistent | KConfig::Global);
- KGlobalSettings::emitChange(KGlobalSettings::NaturalSortingChanged);
- }
}
void BehaviorSettingsPage::restoreDefaults()
@@ -133,7 +127,7 @@ void BehaviorSettingsPage::loadSettings()
m_showToolTips->setChecked(GeneralSettings::showToolTips());
m_showSelectionToggle->setChecked(GeneralSettings::showSelectionToggle());
- m_naturalSorting->setChecked(KGlobalSettings::naturalSorting());
+ m_naturalSorting->setChecked(GeneralSettings::naturalSorting());
m_renameInline->setChecked(GeneralSettings::renameInline());
}