Bug 493634

Summary: openPlasmoidItem.qml:60: TypeError: Property 'pressed' (...) is not a function
Product: [Plasma] plasmashell Reporter: postix <postix>
Component: System Tray widgetAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kde, materka, nate
Priority: NOR    
Version First Reported In: 6.1.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

Description postix 2024-09-25 12:55:58 UTC
In the system tray, nothing happens when I try to click on "Notifications". Journalctl logs the following on each click:

```
plasmashell[2903]: file:///usr/share/plasma/plasmoids/org.kde.plasma.private.systemtray/contents/ui/items/PlasmoidItem.qml:60: TypeError: Property 'pressed' of object CompactRepresentation_QMLTYPE_272(0x55ee59d34430) is not a function
```

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20240923
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.6.0
Qt Version: 6.7.2
Graphics Platform: Wayland
Comment 1 postix 2024-09-25 12:58:03 UTC
Looks like the error is logged for any entry in the system tray, but other applets actually open despite the error.
Comment 2 Niccolò Venerandi 2024-09-27 11:18:09 UTC
Git commit 005574fe8d16d1bc8cea72b372da6f42e74fee71 by Niccolò Venerandi.
Committed on 27/09/2024 at 11:18.
Pushed by niccolove into branch 'master'.

Switch to calling the onPressed handler directly


This is because the "pressed" signal is overridden by its bool value
on the MouseArea item.

This fixes the inability to open/close applets by clicking in the space between them in the system tray.
Related: bug 492158

M  +5    -1    applets/systemtray/package/contents/ui/items/PlasmoidItem.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/005574fe8d16d1bc8cea72b372da6f42e74fee71
Comment 3 Niccolò Venerandi 2024-09-27 11:18:26 UTC
Git commit df76286c47856671937932772c86223e152204c5 by Niccolò Venerandi.
Committed on 27/09/2024 at 11:18.
Pushed by niccolove into branch 'Plasma/6.2'.

Switch to calling the onPressed handler directly


This is because the "pressed" signal is overridden by its bool value
on the MouseArea item.

This fixes the inability to open/close applets by clicking in the space between them in the system tray.
Related: bug 492158


(cherry picked from commit 005574fe8d16d1bc8cea72b372da6f42e74fee71)

24b4a223 Switch to calling the onPressed handler directly

Co-authored-by: Niccolò Venerandi <niccolo@venerandi.com>

M  +5    -1    applets/systemtray/package/contents/ui/items/PlasmoidItem.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/df76286c47856671937932772c86223e152204c5