forked from qt-creator/qt-creator
C++: Transfer noexcept specifier for refactoring actions
This applies for e.g. * "Add Definition..." (on function decl) * "Move Definition..." (on function decl) * "Insert Virtual Functions of Base Class" (on class specifier) Fixes: QTCREATORBUG-11849 Fixes: QTCREATORBUG-19699 Change-Id: I0d259bc1782470f3b3f19617230005a5594a5cca Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
@@ -136,6 +136,7 @@ public:
|
||||
funTy->setConst(type->isConst());
|
||||
funTy->setVolatile(type->isVolatile());
|
||||
funTy->setRefQualifier(type->refQualifier());
|
||||
funTy->setExceptionSpecification(type->exceptionSpecification());
|
||||
|
||||
funTy->setName(rewrite->rewriteName(type->name()));
|
||||
|
||||
|
||||
@@ -487,6 +487,12 @@ void TypePrettyPrinter::visit(Function *type)
|
||||
? QLatin1String("&")
|
||||
: QLatin1String("&&");
|
||||
}
|
||||
|
||||
// add exception specifier
|
||||
if (const StringLiteral *spec = type->exceptionSpecification()) {
|
||||
appendSpace();
|
||||
_text += QLatin1String(spec->chars());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user