plasmoid: Add port to KF6/Plasma 6 alongside the current KF5/Plasma 5 version
Summary
Currently the plasmoid is still written for KF5/Plasma 5, and in addition it also still uses PlasmaComponents2 stuff, which has been removed in KF6/Plasma 6. So, this is an attempt to port the plasmoid so that it works in Plasma 6. Any suggestions very much welcome, this is my first time doing anything significant with QML and plasmoids.
This MR has been updated to not overwrite the current KF5 plasmoid, so merging this won't break existing setups that still use KF5.
This is what it looks like currently, with two devices connected (an Android phone with KDE Connect 1.29.0 and a PC with KDE Connect 23.04.2). Not sure what's up with the notifications from the PC, but it's also like that with the plasmoid from 23.08.3.
Known issues/regressions (no idea how to fix these, so help wanted)
- Hovering over the buttons (the per device menu, the clear notification(s) buttons, the Virtual Display button) don't show an outline around them
- The problem appears to be that the ToolTipArea for telling the user about the drag and drop functionality is in the way, removing it makes the hover effect around the buttons work
- Clicking the Virtual Display button causes KWin to go on a restart loop (technically not a problem with the plasmoid I guess)
- The lines separating devices, notifications and remote commands from each other are missing (unlike the 23.08.3 plasmoid)
- Remote commands that are too long end up going out of bounds (the 23.08.3 plasmoid also exhibits this behaviour)
-
DeviceDelegate.qml:412:17 depends on non-NOTIFYable properties: RemoteCommandsDbusInterface::canAddCommand
error appears in the logs, guessing that's something outside of the QML
Tested and works
- Phone signal
- Battery status
- Per-device menu
- Share file
- Ring device
- Browse device
- Drag and drop to send file
- Notifications
- Clearing all notifications
- Clearing individual notifications
- Clicking on a notification that's too long to expand it
- Replying to notifications
- Remote keyboard
- Remote commands
- Button to open the dialog to add commands on the remote device
- Executing commands
- Button in the plasmoid header to open the KCM
- Context menu option to open the KCM
- Layout adjusts when resizing the plasmoid
Untested
- SMS option in the per-device menu
- Probably anything else I haven't mentioned
Test Plan
Before:
The plasmoid does not appear at all in Plasma 6.
After:
The plasmoid should appear in Plasma 6 and work like it did before.