CppEditor: Make check for clangd more fine-grained

... in the quickfix factories.
We want to be able to offer or not offer certain quickfixes based on the
current clangd version.

Change-Id: I7dca69ff990ab9f1a691785cd72e633f7882ae3d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Christian Kandeler
2024-02-20 16:23:25 +01:00
parent b9e4c98f1d
commit 5956254e6f
11 changed files with 36 additions and 17 deletions

View File

@@ -338,7 +338,7 @@ public:
class CompleteSwitchCaseStatement: public CppQuickFixFactory
{
public:
CompleteSwitchCaseStatement() { setHasClangdReplacement(); }
CompleteSwitchCaseStatement() { setClangdReplacement({12}); }
private:
void doMatch(const CppQuickFixInterface &interface, QuickFixOperations &result) override;
@@ -580,7 +580,7 @@ public:
class RemoveUsingNamespace : public CppQuickFixFactory
{
public:
RemoveUsingNamespace() { setHasClangdReplacement(); }
RemoveUsingNamespace() { setClangdReplacement({10}); }
private:
void doMatch(const CppQuickFixInterface &interface, TextEditor::QuickFixOperations &result) override;