Skip to content
Commit 3d4640be authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Fix crash with sortAllByName/Description

Summary:
Calling QTreeWidgetItem::takeChildren() on invisibleRootItem() results
in a crash because it calls QTreeModel::beginRemoveItems() which calls
QTreeModel::index() on that item which returns an invalid QModelIndex.

Instead iterate over topLevelItem's and sort them.

Test Plan:
- Sort all by name/description causes a crash
- Apply the patch then try again, it should work

Reviewers: mlaurent

Reviewed By: mlaurent

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D24615
parent 3784ba13
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