From 90ff9be54a87fb0d7ddbfdfe0245b05aa9927d25 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 3 May 2021 16:35:08 +0200 Subject: [PATCH] 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 --- src/plugins/coreplugin/find/searchresulttreemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/find/searchresulttreemodel.cpp b/src/plugins/coreplugin/find/searchresulttreemodel.cpp index ed3bd28dec9..71712c18fee 100644 --- a/src/plugins/coreplugin/find/searchresulttreemodel.cpp +++ b/src/plugins/coreplugin/find/searchresulttreemodel.cpp @@ -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;