forked from qt-creator/qt-creator
C++ insert def: Fix bug when minimizing name.
Constructors would not get the correct name before. Now rewriting the function's name is not done by going through the 'rewrite type' func- tionality but rather by minimizing the symbol's name directly. Task-number: QTCREATORBUG-6223 Change-Id: I3c25e414337937f5dd0f54570c899ca2ca21d2ef Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
@@ -261,13 +261,7 @@ public:
|
||||
FullySpecifiedType tn = rewriteType(m_decl->type(), &env, control);
|
||||
|
||||
// rewrite the function name
|
||||
QString name;
|
||||
const FullySpecifiedType nametype = rewriteType(control->namedType(m_decl->name()), &env, control);
|
||||
if (NamedType *nt = nametype.type()->asNamedType()) {
|
||||
name = oo(nt->name());
|
||||
} else {
|
||||
name = oo(LookupContext::fullyQualifiedName(m_decl));
|
||||
}
|
||||
QString name = oo(LookupContext::minimalName(m_decl, targetCoN, control));
|
||||
|
||||
QString defText = oo.prettyType(tn, name) + "\n{\n}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user