aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cppquickfixes.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2023-06-28 12:47:38 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2023-06-29 11:51:19 +0000
commitbcd49bafdd9432ce7abbd20cceabe853358231c8 (patch)
tree37492e97a0288e58864cdf3211165b7260b7a5ca /src/plugins/cppeditor/cppquickfixes.cpp
parent379e7f906e6f1dd8656364f5a2cf4feed2127d0f (diff)
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 <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixes.cpp')
-rw-r--r--src/plugins/cppeditor/cppquickfixes.cpp9
1 files changed, 9 insertions, 0 deletions
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] {