<table><tr><td style="">davidedmundson added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D3950" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>I have an idea what could be wrong. (though it's a guess from reading a tonne of code)</p>
<p>LauncherTaskModel is activity aware.</p>
<p>When I change activity I will cause my (filtered) GroupsModel to change<br />
and cause launchertasksmodel to change in the *same event*</p>
<p>Therefore the indexes you save in connect(groupingProxyModel, &QAbstractItemModel::rowsAboutToBeRemoved, will be mangled by the time you call dataChanged, one event later.</p>
<p>If that's the issue, then this code will do exactly the same thing.</p>
<p>What might work is storing the launchers to update by AppID instead?</p>
<p>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</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R120 Plasma Workspace</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3950" rel="noreferrer">https://phabricator.kde.org/D3950</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>hein, mart, davidedmundson<br /><strong>Cc: </strong>plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas<br /></div>