CppEditor: Improve "definition from declaration" for templates

- Make sure the template parameters are included in the definition.
- Find the correct insertion location when using an already-defined
  template member function as an anchor.

Fixes: QTCREATORBUG-24848
Change-Id: I1272ba36403904e7aed81bcef48745793c5e2217
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2020-11-12 12:12:13 +01:00
parent ccf1d17bfe
commit 3cd2e2c445
3 changed files with 25 additions and 8 deletions

View File

@@ -3040,6 +3040,7 @@ public:
oo.showReturnTypes = true;
oo.showArgumentNames = true;
oo.showEnclosingTemplate = true;
oo.showTemplateParameters = true;
if (defPos == DefPosInsideClass) {
const int targetPos = targetFile->position(loc.line(), loc.column());