summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppdoxygen_test.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-11-05 15:47:35 +0100
committerChristian Kandeler <christian.kandeler@qt.io>2020-11-06 12:32:13 +0000
commit7116c7c60f70dd8078743d138bde52f79336ca66 (patch)
treecc5b6bd593e9ec705931335aa72d08c6e05d9d74 /src/plugins/cppeditor/cppdoxygen_test.cpp
parenta68ec8ae24b38f4327fa02a1b6a241dea0a320aa (diff)
downloadqt-creator-7116c7c60f70dd8078743d138bde52f79336ca66.tar.gz
CppEditor: Fix doxygen continuation
... for the case where the cursor is on the first line of the comment. At this point, we have just found out that no initial skeleton is to be created and that we want to do a continuation instead. Therefore, we need to rewind the cursor position, so handleDoxygenContinuation() will receive the original cursor. Fixes: QTCREATORBUG-20677 Change-Id: I42f1b83df624a9833fe13e1fa01e41c5c6c45334 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/cppeditor/cppdoxygen_test.cpp')
-rw-r--r--src/plugins/cppeditor/cppdoxygen_test.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/cppeditor/cppdoxygen_test.cpp b/src/plugins/cppeditor/cppdoxygen_test.cpp
index 9fc6f1575c..9511b6df6e 100644
--- a/src/plugins/cppeditor/cppdoxygen_test.cpp
+++ b/src/plugins/cppeditor/cppdoxygen_test.cpp
@@ -81,6 +81,21 @@ void DoxygenTest::testBasic_data()
"int a;\n"
);
+ QTest::newRow("qt_style_cursor_before_existing_comment") << _(
+ "bool preventFolding;\n"
+ "/*!|\n"
+ " * \\brief something\n"
+ " */\n"
+ "int a;\n"
+ ) << _(
+ "bool preventFolding;\n"
+ "/*!\n"
+ " * \n"
+ " * \\brief something\n"
+ " */\n"
+ "int a;\n"
+ );
+
QTest::newRow("qt_style_continuation") << _(
"bool preventFolding;\n"
"/*!\n"