Bug 410842

Summary: Notifications kcm: duplicated apps after I clear search results in "Application settings"
Product: [Applications] systemsettings Reporter: Patrick Silva <bugseforuns>
Component: kcm_notifyAssignee: Olivier Goffart <ogoffart>
Status: RESOLVED FIXED    
Severity: normal CC: kishore96, nate, plasma-bugs
Priority: NOR    
Version: 5.16.90   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.17.5
Attachments: screen recording

Description Patrick Silva 2019-08-12 09:34:31 UTC
Created attachment 122076 [details]
screen recording

STEPS TO REPRODUCE
1. open system settings > notifications
2. click "Configure..." button
3. search for an app or system service
4. clear the search results

OBSERVED RESULT
duplicated apps. Watch the attached screen recording please.

EXPECTED RESULT
apps and system services never are duplicated

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.16.80
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.3
Comment 1 Kai Uwe Broulik 2019-08-13 21:18:49 UTC
Something veeeeery funky is going on with either the proxy model or source model and I haven't figure out yet what's going on. QAbstractItemModelTest passes both and the proxy doing the filtering is just a dumb proxy. :/
Comment 2 Nate Graham 2019-10-27 21:58:04 UTC
*** Bug 413503 has been marked as a duplicate of this bug. ***
Comment 3 Kai Uwe Broulik 2020-01-07 10:13:09 UTC
Git commit b639338291d42314ce3eabde712fee41babbbb69 by Kai Uwe Broulik.
Committed on 07/01/2020 at 10:12.
Pushed by broulik into branch 'Plasma/5.17'.

[Notifications KCM] Fixup current item syncing logic

Instead of relying on currentIndex and some massively complicated logic to track when the index didn't change
but the item behind that index, just use currentItem.
The updateCurrentIndex being called during model changes massively confused ListView leading to inconsistent view state.
FIXED-IN: 5.17.5

Differential Revision: https://phabricator.kde.org/D26425

M  +1    -31   kcms/notifications/package/contents/ui/SourcesPage.qml

https://commits.kde.org/plasma-desktop/b639338291d42314ce3eabde712fee41babbbb69