Bug 470698 - Places panels in Qt6 apps have empty entries under "Devices" section
Summary: Places panels in Qt6 apps have empty entries under "Devices" section
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Places (show other bugs)
Version: git master
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2023-06-06 11:31 UTC by Patrick Silva
Modified: 2023-07-05 08:01 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot (49.20 KB, image/png)
2023-06-06 11:31 UTC, Patrick Silva
Details
user-places.xbel (15.13 KB, application/x-xbel)
2023-06-17 00:38 UTC, Nate Graham
Details
user-places.xbel file (15.83 KB, application/x-xbel)
2023-06-17 11:43 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2023-06-06 11:31:22 UTC
Created attachment 159494 [details]
screenshot

STEPS TO REPRODUCE
1. open a Qt6 app able to invoke the file open/save dialogs - I can reproduce with Strawberry music player
2. invoke the file open or save dialog
3. 

OBSERVED RESULT
empty entries under "Devices" section. Please see the attached screenshot.

EXPECTED RESULT
no empty entry

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.5.0
Graphics Platform: Wayland
Comment 1 Patrick Silva 2023-06-06 11:34:11 UTC
I have three partitions but only the / labeled "NEON" is listed under "Devices".
Comment 2 Nate Graham 2023-06-06 17:27:25 UTC
Can reproduce.
Comment 3 Nicolas Fella 2023-06-16 22:43:22 UTC
Please attach .local/share/user-places.xbel
Comment 4 Nate Graham 2023-06-17 00:38:13 UTC
Created attachment 159727 [details]
user-places.xbel
Comment 5 Patrick Silva 2023-06-17 11:43:55 UTC
Created attachment 159741 [details]
user-places.xbel file
Comment 6 Méven Car 2023-07-05 08:01:37 UTC
Git commit f3f4070e1cea1b3365550763f66ba32792ed57c3 by Méven Car, on behalf of Kai Uwe Broulik.
Committed on 05/07/2023 at 07:40.
Pushed by meven into branch 'master'.

KFilePlacesModel: Only create places item for known devices

Otherwise we'll create entries for devices that aren't there,
leading to broken entries. It  would also bluntly overwrite
an existing device entry with a broken one further down.

While at it, mutate the container (erase) only after the
value has been used.

M  +4    -11   src/filewidgets/kfileplacesmodel.cpp

https://invent.kde.org/frameworks/kio/-/commit/f3f4070e1cea1b3365550763f66ba32792ed57c3