Bug 464528

Summary: Latte tasks applet is broken because of drag handling change in plasma starting from 5.27 beta
Product: [Plasma] lattedock Reporter: Dmitrii Chermnykh <chermnykh2001>
Component: plasmoidAssignee: Fushan Wen <qydwhotmail>
Status: RESOLVED FIXED    
Severity: normal CC: cellstije, chermnykh2001, lewis, qydwhotmail
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Dmitrii Chermnykh 2023-01-19 22:51:42 UTC
SUMMARY
The applet does not load by default because the property `dragIconSize` of `TaskManagerApplet.DragHelper` no longer exists. Removing the property makes latte render the widget but icon dragging no longer works. 

STEPS TO REPRODUCE
1. Try to load the dock with latte tasks applet
2. latte task applet does not load 
3. Comment out line `dragIconSize: units.iconSizes.medium` in `main.qml` of latte tasks applet
4. The applet loads but dragging is broken


EXPECTED RESULT
Latte tasks works out of the box


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Latte dock version: latte-dock-git 0.10.8.r6009.daa1e6b0-1
Comment 1 Dmitrii Chermnykh 2023-01-19 23:19:48 UTC
The related change https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1224
Comment 2 Lewis Lakerink 2023-01-21 07:32:02 UTC
Yep, same. 

I can confirm that "Comment out line `dragIconSize: units.iconSizes.medium` in `main.qml` of latte tasks applet" does at least get the tasks applet showing again. Thanks for that.
Comment 3 Fushan Wen 2023-01-23 02:49:06 UTC
Git commit 218ff83986140c972078689be1b6156fda7b49a2 by Fushan Wen.
Committed on 23/01/2023 at 02:47.
Pushed by fusionfuture into branch 'master'.

plasmoid: port away from custom drag handler
Related: bug 402376

M  +3    -8    plasmoid/package/contents/ui/main.qml
M  +9    -3    plasmoid/package/contents/ui/task/TaskItem.qml
M  +9    -6    plasmoid/package/contents/ui/task/TaskMouseArea.qml

https://invent.kde.org/plasma/latte-dock/commit/218ff83986140c972078689be1b6156fda7b49a2
Comment 4 Fushan Wen 2023-01-23 05:00:21 UTC
Git commit a1451a56c299a49d3184bb942ca3855a25ef8fb4 by Fushan Wen.
Committed on 23/01/2023 at 04:50.
Pushed by fusionfuture into branch 'master'.

applets/taskmanager: restore old `DragHelper` for 3rd-party widgets

M  +62   -26   applets/taskmanager/plugin/draghelper.cpp
M  +26   -6    applets/taskmanager/plugin/draghelper.h

https://invent.kde.org/plasma/plasma-desktop/commit/a1451a56c299a49d3184bb942ca3855a25ef8fb4
Comment 5 Fushan Wen 2023-01-23 05:00:30 UTC
Git commit e9269e51515edf02727ec0e19773cc9705106d7b by Fushan Wen.
Committed on 23/01/2023 at 04:56.
Pushed by fusionfuture into branch 'master'.

plasmoid: use `generateMimeData` in `Backend`

M  +1    -1    plasmoid/package/contents/ui/task/TaskItem.qml
M  +1    -1    plasmoid/package/contents/ui/task/TaskMouseArea.qml

https://invent.kde.org/plasma/latte-dock/commit/e9269e51515edf02727ec0e19773cc9705106d7b
Comment 6 Fushan Wen 2023-01-23 05:08:33 UTC
Git commit 6b50aeea936fdd08721e4692cd7bd4e75dbc3946 by Fushan Wen.
Committed on 23/01/2023 at 05:01.
Pushed by fusionfuture into branch 'Plasma/5.27'.

applets/taskmanager: restore old `DragHelper` for 3rd-party widgets
(cherry picked from commit a1451a56c299a49d3184bb942ca3855a25ef8fb4)

M  +62   -26   applets/taskmanager/plugin/draghelper.cpp
M  +26   -6    applets/taskmanager/plugin/draghelper.h

https://invent.kde.org/plasma/plasma-desktop/commit/6b50aeea936fdd08721e4692cd7bd4e75dbc3946
Comment 7 Fushan Wen 2023-01-26 01:29:38 UTC
Git commit aa04303c6323e139a62c28c0f3fdf10bec563e6f by Fushan Wen.
Committed on 26/01/2023 at 01:27.
Pushed by fusionfuture into branch 'master'.

plasmoid: remove deprecated DragHelper

It's removed in Plasma 6.

M  +1    -1    plasmoid/package/contents/ui/main.qml

https://invent.kde.org/plasma/latte-dock/commit/aa04303c6323e139a62c28c0f3fdf10bec563e6f
Comment 8 Antonio Rojas 2023-01-28 15:20:48 UTC
*** Bug 464938 has been marked as a duplicate of this bug. ***