summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/patchtool.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2020-12-10 11:24:27 +0100
committerEike Ziller <eike.ziller@qt.io>2020-12-11 08:02:57 +0000
commita40e5b5382dc15cc9dc5ed44eeae4d1707b894cc (patch)
tree767b5cf2935861f43dbe828da408bbe690c8f149 /src/plugins/coreplugin/patchtool.cpp
parente2eab0e01669b1ca1d59d118349a106f81e9a64a (diff)
downloadqt-creator-a40e5b5382dc15cc9dc5ed44eeae4d1707b894cc.tar.gz
Core: Save less settings
Try to not save settings that weren't changed from their default, and make it possible for defaults to change in the future. Task-number: QTCREATORBUG-24762 Change-Id: If469b72573791bc92ed535edf00271ef09b55386 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/patchtool.cpp')
-rw-r--r--src/plugins/coreplugin/patchtool.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/patchtool.cpp b/src/plugins/coreplugin/patchtool.cpp
index be530e6a0a..1fdb9a34ba 100644
--- a/src/plugins/coreplugin/patchtool.cpp
+++ b/src/plugins/coreplugin/patchtool.cpp
@@ -53,9 +53,9 @@ QString PatchTool::patchCommand()
void PatchTool::setPatchCommand(const QString &newCommand)
{
- QSettings *s = ICore::settings();
+ Utils::QtcSettings *s = ICore::settings();
s->beginGroup(QLatin1String(settingsGroupC));
- s->setValue(QLatin1String(patchCommandKeyC), newCommand);
+ s->setValueWithDefault(QLatin1String(patchCommandKeyC), newCommand, QString(patchCommandKeyC));
s->endGroup();
}