aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppcodestylepreferences.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cppeditor/cppcodestylepreferences.cpp')
-rw-r--r--src/plugins/cppeditor/cppcodestylepreferences.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/plugins/cppeditor/cppcodestylepreferences.cpp b/src/plugins/cppeditor/cppcodestylepreferences.cpp
index f0731aeba2..85d73ff8af 100644
--- a/src/plugins/cppeditor/cppcodestylepreferences.cpp
+++ b/src/plugins/cppeditor/cppcodestylepreferences.cpp
@@ -89,22 +89,19 @@ void CppCodeStylePreferences::slotCurrentValueChanged(const QVariant &value)
emit currentCodeStyleSettingsChanged(value.value<CppCodeStyleSettings>());
}
-void CppCodeStylePreferences::toMap(const QString &prefix, QVariantMap *map) const
+QVariantMap CppCodeStylePreferences::toMap() const
{
- ICodeStylePreferences::toMap(prefix, map);
- if (currentDelegate())
- return;
-
- m_data.toMap(prefix, map);
+ QVariantMap map = ICodeStylePreferences::toMap();
+ if (!currentDelegate())
+ map.insert(m_data.toMap());
+ return map;
}
-void CppCodeStylePreferences::fromMap(const QString &prefix, const QVariantMap &map)
+void CppCodeStylePreferences::fromMap(const QVariantMap &map)
{
- ICodeStylePreferences::fromMap(prefix, map);
- if (currentDelegate())
- return;
-
- m_data.fromMap(prefix, map);
+ ICodeStylePreferences::fromMap(map);
+ if (!currentDelegate())
+ m_data.fromMap(map);
}
} // namespace CppEditor