KDescendantsProxyModel has many asserts in the code to ensure that the source model isn't empty, resulting in app crashes when it is empty.
Git commit e9156500e2f1fdc84d2307a9ac6e5dda3e82ee6e by Jan Blackquill, on behalf of Tino Lorenz. Committed on 18/04/2022 at 23:29. Pushed by cblack into branch 'master'. Fix assertions in KDescendantsProxyModel Remove assertions in `kdescendantsproxymodel.cpp` that will make the program crash when the model is empty. Note: if `hasChildren` returns true, it doesn't mean that `rowCount` for the same index must be >0. For example, KDirModel's `hasChildren` returns true for directories with >=1 children, but its `rowCount` doesn't list the children and just returns 0 if they weren't already listed. M +49 -2 autotests/kdescendantsproxymodeltest.cpp M +7 -15 src/core/kdescendantsproxymodel.cpp https://invent.kde.org/frameworks/kitemmodels/commit/e9156500e2f1fdc84d2307a9ac6e5dda3e82ee6e