CppEditor: Preserve indent during Doxygen continuation handling

Change-Id: I30bba610fbe03fbfd9bc987805c57df6035d1c36
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Lorenz Haas
2015-02-09 20:06:27 +01:00
parent 0ef651240d
commit 88ee2bfb64
2 changed files with 12 additions and 1 deletions

View File

@@ -176,7 +176,7 @@ bool handleDoxygenCppStyleContinuation(QTextCursor &cursor)
return false;
QString newLine(QLatin1Char('\n'));
newLine.append(QString(offset, QLatin1Char(' '))); // indent correctly
newLine.append(text.left(offset)); // indent correctly
newLine.append(commentMarker);
newLine.append(QLatin1Char(' '));

View File

@@ -205,6 +205,17 @@ void DoxygenTest::testBasic_data()
" int a;\n"
);
QTest::newRow("cpp_styleA_indented_preserve_mixed_indention_continuation") << _(
"\t bool preventFolding;\n"
"\t /// \brief a|\n"
"\t int a;\n"
) << _(
"\t bool preventFolding;\n"
"\t /// \brief a\n"
"\t /// \n"
"\t int a;\n"
);
/// test cpp style doxygen comment continuation when inside a indented scope
QTest::newRow("cpp_styleA_indented_continuation") << _(
" bool preventFolding;\n"