CppEditor: Add enclosing template on "Move Definition Outside"

The template id for the class name is missing, but it's better than
nothing.

For example:

template<class T>
class Foo
{
    void func() {} // Move Definition Outside Class
};

// The following lines are added
template<class T>
void Foo::func() {} // Should be Foo<T>::func

Task-number: QTCREATORBUG-16649
Change-Id: Icb560e0b87f563cbda18f4742f44bb8ef4d8a900
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Orgad Shaneh
2016-08-21 22:33:03 +03:00
committed by Orgad Shaneh
parent d0d1f43e8f
commit 34baa3ec47
2 changed files with 3 additions and 2 deletions

View File

@@ -4657,6 +4657,7 @@ QString definitionSignature(const CppQuickFixInterface *assist,
oo.showFunctionSignatures = true;
oo.showReturnTypes = true;
oo.showArgumentNames = true;
oo.showEnclosingTemplate = true;
const Name *name = func->name();
if (name && nameIncludesOperatorName(name)) {
CoreDeclaratorAST *coreDeclarator = functionDefinitionAST->declarator->core_declarator;