From bcd49bafdd9432ce7abbd20cceabe853358231c8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 28 Jun 2023 12:47:38 +0200 Subject: CppEditor: Add test case for quickfix formatting Also fixes an off-by-one error in the formatting code that was uncovered by the test. Change-Id: I013194e21cf37f318bb806bb60ea659b91b99fbf Reviewed-by: David Schulz Reviewed-by: Qt CI Bot Reviewed-by: --- src/plugins/cppeditor/cppquickfixes.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/plugins/cppeditor/cppquickfixes.cpp') diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp index 77672a8569..93596f5ec4 100644 --- a/src/plugins/cppeditor/cppquickfixes.cpp +++ b/src/plugins/cppeditor/cppquickfixes.cpp @@ -3478,6 +3478,15 @@ private: settings = dlg.settings(); break; } + case InsertDefsFromDecls::Mode::Impl: { + for (Symbol * const func : std::as_const(unimplemented)) { + MemberFunctionImplSetting setting; + setting.func = func; + setting.defPos = DefPosImplementationFile; + settings << setting; + } + break; + } case InsertDefsFromDecls::Mode::Alternating: { int defPos = DefPosImplementationFile; const auto incDefPos = [&defPos] { -- cgit v1.2.3