ClangCodeModel: Another clangd cursor adjustment

QVector<QString|> should go to QString, not QVector.

Fixes: QTCREATORBUG-27524
Change-Id: Iceab3d9a796bbe974a13cea3fa91de9b4aaaee7a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2022-05-11 10:54:24 +02:00
parent 3784f69c9e
commit f03868bd6b

View File

@@ -2772,6 +2772,13 @@ QTextCursor ClangdClient::Private::adjustedCursor(const QTextCursor &cursor,
c.setPosition(posForToken(destrAst->tilde_token));
return c;
}
// QVector<QString|>
if (const TemplateIdAST * const templAst = (*it)->asTemplateId()) {
if (posForToken(templAst->greater_token) == cursor.position())
return leftMovedCursor();
return cursor;
}
}
return cursor;
}