forked from qt-creator/qt-creator
CppEditor: Preserve indent during Doxygen continuation handling
Change-Id: I30bba610fbe03fbfd9bc987805c57df6035d1c36 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
@@ -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(' '));
|
||||
|
||||
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user