Summary: | Empty button appears in Camera actions after installing required drivers to import photos | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | ratijas <me> |
Component: | Disks & Devices widget | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | bugseforuns, nate |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | 1.0 | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/plasma-workspace/commit/8b51f292aaa064408131061c7384775b0f1144dd | Version Fixed In: | 5.25 |
Sentry Crash Report: | |||
Attachments: | Disks & Devices - Camera - empty row |
Sometimes I see the same bug on Arch Linux and neon unstable. The bug affects even internal partitions when the applet is set to show all devices. Unfortunately I do not know the exact steps to reproduce yet. More likely a bug in the applet itself as how it translates Solid actions into clickable buttons is quite horrific. But I wouldn't rule out bad data in the backend either, yeah. With all due respect to the original implementation, I think it just lacks test cases to ensure it upholds its contracts. But I've never used or even seen a testing infrastructure in plasma-frameworks, I think? I'm allowed to insult the implementation because I wrote it lol Git commit af98cef3ef004c564e545ef13c6a0742125e0b02 by ivan tkachenko. Committed on 08/06/2022 at 01:00. Pushed by ratijas into branch 'master'. [applets/devicenotifier] Prevent empty or duplicated actions in expanded view Unfortunately, the list<> basic QML type is too primitive, it does not even expose any kind of remove() functionality, so the only supported way is to create a new list and assign it instead. This fixes the bug when there may appear multiple empty or duplicating actions in the expanded view due to the fact they they were only added to but never cleaned up / removed from the list of contextual actions. M +5 -1 applets/devicenotifier/package/contents/ui/DeviceItem.qml https://invent.kde.org/plasma/plasma-workspace/commit/af98cef3ef004c564e545ef13c6a0742125e0b02 Git commit 8b51f292aaa064408131061c7384775b0f1144dd by ivan tkachenko. Committed on 08/06/2022 at 01:25. Pushed by ratijas into branch 'Plasma/5.25'. [applets/devicenotifier] Prevent empty or duplicated actions in expanded view Unfortunately, the list<> basic QML type is too primitive, it does not even expose any kind of remove() functionality, so the only supported way is to create a new list and assign it instead. This fixes the bug when there may appear multiple empty or duplicating actions in the expanded view due to the fact they they were only added to but never cleaned up / removed from the list of contextual actions. (cherry picked from commit af98cef3ef004c564e545ef13c6a0742125e0b02) M +5 -1 applets/devicenotifier/package/contents/ui/DeviceItem.qml https://invent.kde.org/plasma/plasma-workspace/commit/8b51f292aaa064408131061c7384775b0f1144dd |
Created attachment 146432 [details] Disks & Devices - Camera - empty row SUMMARY The bug is either somewhere in the way ExpandableListItem manages list of actions, or in the backend that provides that list. Unfortunately, I didn't GammaRay it, but it might be reproducible. STEPS TO REPRODUCE 0. Not having any drivers for transferring photos from camera (PTP) installed. 1. Connect Android phone or any camera. 2. Disks & Devices applet pops up from system tray. 3. In the actions of camera there are two buttons, one is to open in Gwenview imported. 4. Gwenview importer says a driver should be installed, and provides a link to a discover page of kamera (wow, noice). 5. Install the driver (kamera). 6. Go to Disks & Devices applet again, because Gwenview told you to restart the import process once the drivers are installed but it didn't provide a Restart button on its own (not noice). OBSERVED RESULT Now in the ExpandableListItem of the phone/camera in Disks & Devices there are three real actions, and one completely empty (no text nor icons, I didn't click it to see what happens just in case). EXPECTED RESULT There should be no empty action buttons like that. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.24.80 KDE Frameworks Version: 5.91.0 Qt Version: 5.15.2 Kernel Version: 5.16.5-arch1-1 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 15.6 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2 plasma-desktop: 963b4ee7a1c56ee68a2d5bf0557862d497fea974 plasma-workspace: 94fc46e38bbdbb3e75aba4a4547d667b3b59af39 plasma-framework: b99c67a07608f5004703f80a61e99f4995a6513a gwenview: 8ce9aa788f6252c31a3d1ab4a5abb8cc62869538 kamera: 21.12.2-1 (Arch Linux package) (I have the repo cloned, but apparently I never built it from source)