forked from qt-creator/qt-creator
CppEditor: Fix indentation with inline namespaces
After encountering the namespace keyword, we have to backtrack the state change introduced by the inline keyword. Fixes: QTCREATORBUG-22071 Change-Id: I543976622d1a56b2c61d68da6ec3eee8b6d0d5b3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -1544,8 +1544,8 @@ void tst_CodeFormatter::indentNamespace()
|
||||
<< Line("};")
|
||||
<< Line("}")
|
||||
<< Line("int j;")
|
||||
<< Line("namespace {")
|
||||
<< Line("namespace Foo {")
|
||||
<< Line("inline namespace {")
|
||||
<< Line("inline namespace Foo {")
|
||||
<< Line("int j;")
|
||||
<< Line("}")
|
||||
<< Line("int j;")
|
||||
@@ -1585,9 +1585,9 @@ void tst_CodeFormatter::indentNamespace2()
|
||||
<< Line(" };")
|
||||
<< Line("}")
|
||||
<< Line("int j;")
|
||||
<< Line("namespace {")
|
||||
<< Line("inline namespace {")
|
||||
<< Line(" int j;")
|
||||
<< Line(" namespace Foo {")
|
||||
<< Line(" inline namespace Foo {")
|
||||
<< Line(" int j;")
|
||||
<< Line(" }")
|
||||
<< Line(" int j;")
|
||||
|
||||
Reference in New Issue
Block a user