forked from qt-creator/qt-creator
C++ editor: support nested class of enclosing template
Fixing: * highlighting * tooltips * find usage * selecting Task-number: QTCREATORBUG-8245 Change-Id: I6e900799e43126706125b7e424567fca2b2c223e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This commit is contained in:
committed by
Nikolai Kosjar
parent
bc137f36a7
commit
23844410fd
@@ -819,6 +819,8 @@ static QList<int> lazyFindReferences(Scope *scope, QString code, Document::Ptr d
|
||||
TypeOfExpression typeOfExpression;
|
||||
snapshot.insert(doc);
|
||||
typeOfExpression.init(doc, snapshot);
|
||||
// make possible to instantiate templates
|
||||
typeOfExpression.setExpandTemplates(true);
|
||||
if (Symbol *canonicalSymbol = CanonicalSymbol::canonicalSymbol(scope, code, typeOfExpression))
|
||||
return CppModelManagerInterface::instance()->references(canonicalSymbol, typeOfExpression.context());
|
||||
return QList<int>();
|
||||
@@ -1522,6 +1524,8 @@ CPPEditorWidget::Link CPPEditorWidget::findLinkAt(const QTextCursor &cursor,
|
||||
|
||||
TypeOfExpression typeOfExpression;
|
||||
typeOfExpression.init(doc, snapshot);
|
||||
// make possible to instantiate templates
|
||||
typeOfExpression.setExpandTemplates(true);
|
||||
const QList<LookupItem> resolvedSymbols =
|
||||
typeOfExpression.reference(expression.toUtf8(), scope, TypeOfExpression::Preprocess);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user