fernando created this revision. fernando added reviewers: davidedmundson, Plasma. fernando added a project: Plasma. Restricted Application added a subscriber: plasma-devel.
REVISION SUMMARY Hey guys, Sorry this is a bit out of the blue, but Bug #386254 <https://bugs.kde.org/show_bug.cgi?id=386254> was infuriating me so much for the past few days that I patched it locally. I figured I may as well submit a code review in case my fix is what a plasma dev would end up doing anyway. It seems that the `Connections` object wasn't actually connecting to the signals, preventing the `sessionsModel` from reloading. I'm not entirely sure why (maybe to do with when the component actually gets loaded?), I found 2 workarounds: - moving the `Connections` object up to the parent scope - creating the binding in JavaScript Maybe I don't remember the QML identifier scoping rules super well, (or there was some other actual issue) but I got a ton of reference errors when attempting the first workaround. However, the second worked. TEST PLAN I don't know if plasma has any automated UI regression tests, so I verified it manually. On my machine the sessions list now updates when I create/remove sessions, but everything else seemed to function as normal. REPOSITORY R114 Plasma Addons REVISION DETAIL https://phabricator.kde.org/D9353 AFFECTED FILES applets/userswitcher/package/contents/ui/main.qml To: fernando, davidedmundson, #plasma Cc: plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart