summaryrefslogtreecommitdiff
path: root/src/plugins/coreplugin/editormanager/editormanager.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@digia.com>2014-02-21 15:43:49 +0100
committerEike Ziller <eike.ziller@digia.com>2014-02-21 16:27:07 +0100
commitc0eaed863025543bd36268df7b588576d5696dd1 (patch)
tree9162a23228ca97b98f95746a8a4f7f21c39fb6a9 /src/plugins/coreplugin/editormanager/editormanager.cpp
parenta471d3ae3d634eeed970eafc1aa609ee47bf86f4 (diff)
downloadqt-creator-c0eaed863025543bd36268df7b588576d5696dd1.tar.gz
Improve performance of writing settings
By wrapping related ones in a single transaction, instead of (implicitly) doing a transaction per settings value that is written. Task-number: QTCREATORBUG-11524 Change-Id: I28e06c9d6cd4ebad024f9c277796abb37df5f992 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/plugins/coreplugin/editormanager/editormanager.cpp')
-rw-r--r--src/plugins/coreplugin/editormanager/editormanager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp
index 146c836718..fa7d79fecf 100644
--- a/src/plugins/coreplugin/editormanager/editormanager.cpp
+++ b/src/plugins/coreplugin/editormanager/editormanager.cpp
@@ -2287,10 +2287,12 @@ static const char autoSaveIntervalKey[] = "EditorManager/AutoSaveInterval";
void EditorManager::saveSettings()
{
SettingsDatabase *settings = ICore::settingsDatabase();
+ settings->beginTransaction();
settings->setValue(QLatin1String(documentStatesKey), d->m_editorStates);
settings->setValue(QLatin1String(reloadBehaviorKey), d->m_reloadSetting);
settings->setValue(QLatin1String(autoSaveEnabledKey), d->m_autoSaveEnabled);
settings->setValue(QLatin1String(autoSaveIntervalKey), d->m_autoSaveInterval);
+ settings->endTransaction();
}
void EditorManager::readSettings()