CppEditor: Add enclosing template on "Add Definition"

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

For example:

template<class T>
class Foo
{
  void func(); // Add Definition
};

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

Change-Id: I60a0cbd348985def3dfb7037067786e942278593
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Orgad Shaneh
2016-08-21 22:24:52 +03:00
committed by Orgad Shaneh
parent 39aff55d8a
commit d0d1f43e8f
3 changed files with 53 additions and 0 deletions

View File

@@ -2567,6 +2567,7 @@ public:
oo.showFunctionSignatures = true;
oo.showReturnTypes = true;
oo.showArgumentNames = true;
oo.showEnclosingTemplate = true;
if (m_defpos == DefPosInsideClass) {
const int targetPos = targetFile->position(m_loc.line(), m_loc.column());