LanguageClient: prevent removing duplicated completion items

The label is not sufficient to identify duplicates for language client
completion items, since the changed text is not always equal to the
label.

Change-Id: I4d3295944a78b541144ecac0982e1f09a53bec8a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2021-07-09 11:33:57 +02:00
parent 03b048dc83
commit a5861b3995

View File

@@ -248,6 +248,7 @@ class LanguageClientCompletionModel : public GenericProposalModel
{ {
public: public:
// GenericProposalModel interface // GenericProposalModel interface
bool containsDuplicates() const override { return false; }
bool isSortable(const QString &/*prefix*/) const override { return true; } bool isSortable(const QString &/*prefix*/) const override { return true; }
void sort(const QString &/*prefix*/) override; void sort(const QString &/*prefix*/) override;
bool supportsPrefixExpansion() const override { return false; } bool supportsPrefixExpansion() const override { return false; }