diff --git a/src/plugins/cppeditor/cppquickfix_test.cpp b/src/plugins/cppeditor/cppquickfix_test.cpp index 71ed7ae6ba2..6d5097a4068 100644 --- a/src/plugins/cppeditor/cppquickfix_test.cpp +++ b/src/plugins/cppeditor/cppquickfix_test.cpp @@ -433,7 +433,7 @@ void CppEditorPlugin::test_quickfix_data() " EnumType t;\n" " @switch (t) {\n" " default:\n" - " break;\n" + " break;\n" " }\n" "}\n" ) << _( @@ -448,7 +448,7 @@ void CppEditorPlugin::test_quickfix_data() " case V2:\n" " break;\n" " default:\n" - " break;\n" + " break;\n" " }\n" "}\n" ); diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index 90283f32e4f..546824fdd6f 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -2700,7 +2700,7 @@ public: + values.join(QLatin1String(":\nbreak;\ncase ")) + QLatin1String(":\nbreak;")); currentFile->setChangeSet(changes); - currentFile->appendIndentRange(currentFile->range(compoundStatement)); + currentFile->appendIndentRange(ChangeSet::Range(start, start + 1)); currentFile->apply(); }