CppEditor: Do not offer "complete switch statement" quickfix

... if the document is managed by clangd.
We should not offer the same functionality twice, and clangd's works
better.

Change-Id: Ifd8edfa91451ab70940a50b550c8d274ee93e6e0
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-10 17:31:11 +02:00
parent 52959ce472
commit 938bef8959

View File

@@ -2474,6 +2474,9 @@ Enum *conditionEnum(const CppQuickFixInterface &interface, SwitchStatementAST *s
void CompleteSwitchCaseStatement::match(const CppQuickFixInterface &interface, void CompleteSwitchCaseStatement::match(const CppQuickFixInterface &interface,
QuickFixOperations &result) QuickFixOperations &result)
{ {
if (CppModelManager::usesClangd(interface.currentFile()->editor()->textDocument()))
return;
const QList<AST *> &path = interface.path(); const QList<AST *> &path = interface.path();
if (path.isEmpty()) if (path.isEmpty())