diff --git a/src/plugins/cppeditor/cppcodestylepreferences.cpp b/src/plugins/cppeditor/cppcodestylepreferences.cpp index 85d73ff8afe..d9615584e75 100644 --- a/src/plugins/cppeditor/cppcodestylepreferences.cpp +++ b/src/plugins/cppeditor/cppcodestylepreferences.cpp @@ -92,8 +92,11 @@ void CppCodeStylePreferences::slotCurrentValueChanged(const QVariant &value) QVariantMap CppCodeStylePreferences::toMap() const { QVariantMap map = ICodeStylePreferences::toMap(); - if (!currentDelegate()) - map.insert(m_data.toMap()); + if (!currentDelegate()) { + const QVariantMap dataMap = m_data.toMap(); + for (auto it = dataMap.begin(), end = dataMap.end(); it != end; ++it) + map.insert(it.key(), it.value()); + } return map; }