Commit 234d66c8 authored by Tobias Hunger's avatar Tobias Hunger

SettingsAccessor: Simplify code

Change-Id: I9391ad1c6f71a795dbea73b1412bf29d3b038c2e
Reviewed-by: default avatarDaniel Teske <>
parent c3906f53
......@@ -832,24 +832,16 @@ bool SettingsAccessor::saveSettings(const QVariantMap &map, QWidget *parent) con
SettingsAccessorPrivate::Settings settings; = map;
settings.path = FileName::fromString(defaultFileName(m_userSuffix));
QVariantMap data = map;
Utils::FileName path = FileName::fromString(defaultFileName(m_userSuffix));
const QVariant &shared = m_project->property(SHARED_SETTINGS);
if (shared.isValid())
trackUserStickySettings(, shared.toMap());
trackUserStickySettings(data, shared.toMap());
if (!d->m_writer || d->m_writer->fileName() != settings.path) {
if (!d->m_writer || d->m_writer->fileName() != path) {
delete d->m_writer;
d->m_writer = new PersistentSettingsWriter(settings.path, QLatin1String("QtCreatorProject"));
QVariantMap data;
for (QVariantMap::const_iterator i =;
i !=;
++i) {
data.insert(i.key(), i.value());
d->m_writer = new PersistentSettingsWriter(path, QLatin1String("QtCreatorProject"));
data.insert(QLatin1String(VERSION_KEY), d->currentVersion());
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