diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2023-06-28 12:47:38 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2023-06-29 11:51:19 +0000 |
commit | bcd49bafdd9432ce7abbd20cceabe853358231c8 (patch) | |
tree | 37492e97a0288e58864cdf3211165b7260b7a5ca /src/plugins/cppeditor/cppquickfixes.cpp | |
parent | 379e7f906e6f1dd8656364f5a2cf4feed2127d0f (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.cpp | 9 |
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] { |