davidedmundson added a comment.
I have an idea what could be wrong. (though it's a guess from reading a tonne of code) LauncherTaskModel is activity aware. When I change activity I will cause my (filtered) GroupsModel to change and cause launchertasksmodel to change in the *same event* Therefore the indexes you save in connect(groupingProxyModel, &QAbstractItemModel::rowsAboutToBeRemoved, will be mangled by the time you call dataChanged, one event later. If that's the issue, then this code will do exactly the same thing. What might work is storing the launchers to update by AppID instead? Side suggestion: Maybe it's worth attaching the ModelTest class to every model here for debug builds. It basically asserts if anything goes wrong a bit weird, which can really help get better feedback REPOSITORY R120 Plasma Workspace BRANCH master REVISION DETAIL https://phabricator.kde.org/D3950 EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: hein, mart, davidedmundson Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas