Find: Stop at the root item when updating the "checked" status

... of search result items.
Otherwise we're breaking assumptions elsewhere.

Fixes: QTCREATORBUG-25662
Change-Id: I9dce79bd58ada02988741741c09e4ce42cc7af03
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2021-05-03 16:35:08 +02:00
parent dec9169efe
commit 90ff9be54a

View File

@@ -262,7 +262,7 @@ bool SearchResultTreeModel::setCheckState(const QModelIndex &idx, Qt::CheckState
void SearchResultTreeModel::updateCheckStateFromChildren(const QModelIndex &idx,
SearchResultTreeItem *item)
{
if (!item)
if (!item || item == m_rootItem)
return;
bool hasChecked = false;