From 41b8e302efb5dc3954c5061722affc69335b2779 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Mon, 6 Dec 2021 12:40:16 +0100 Subject: [PATCH] CppEditor: Fix compile with Qt5.14 Amends ef308312133. Change-Id: I3c8a962c558114bd64e8e07d7212e4f14ecffa90 Reviewed-by: Orgad Shaneh --- src/plugins/cppeditor/cppcodestylepreferences.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; }