CppEditor: Ensure a space between ref qualifier and exception spec

Task-number: QTCREATORBUG-27132
Change-Id: Iedb983f58ece345d5997607d2e557e36c951750f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Christian Kandeler
2022-04-05 13:37:09 +02:00
parent b404852cb1
commit c2c8b137c0
2 changed files with 5 additions and 2 deletions

View File

@@ -531,6 +531,9 @@ void TypePrettyPrinter::visit(Function *type)
// add exception specifier
if (const StringLiteral *spec = type->exceptionSpecification()) {
if (type->refQualifier() != Function::NoRefQualifier)
_text.append(' ');
else
appendSpace();
_text += QLatin1String(spec->chars());
}