Commit d545aaee authored by Nikolai Kosjar's avatar Nikolai Kosjar

TextEditor: Delete also duplicated assist items

~GenericProposalModel() did not delete all original items loaded, but the
original items minus the recognized duplicates.

Change-Id: If34f805f8f86391be6e7590e943c1c5adac14869
Reviewed-by: Eike Ziller's avatarEike Ziller <eike.ziller@qt.io>
Reviewed-by: default avatarDavid Schulz <david.schulz@theqtcompany.com>
parent 68974f2b
......@@ -179,6 +179,7 @@ void GenericProposalModel::removeDuplicates()
const AssistProposalItemInterface *item = *it;
if (unique.contains(item->text())
&& unique.value(item->text()) == item->hash()) {
delete *it;
it = m_originalItems.erase(it);
} else {
unique.insert(item->text(), item->hash());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment