Bug 476166

Summary: Unable to change user avatar in Plasma 6
Product: [Applications] systemsettings Reporter: Thiago Sueto <herzenschein>
Component: kcm_usersAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: uhhadd
Priority: NOR Keywords: qt6
Version First Reported In: master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Thiago Sueto 2023-10-27 16:27:11 UTC
SUMMARY
Attempting to change the user avatar fails.

STEPS TO REPRODUCE
1. Go to the Users KCM
2. Click on the current avatar icon
3. Click on the option to select a new file
4. Choose the file and confirm the dialog

OBSERVED RESULT
The dialog closes as though nothing happened, showing the avatar icon list.

EXPECTED RESULT
The avatar should be updated.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.80
KDE Frameworks Version: 5.240.0
Qt Version: 6.6.0
Kernel Version: 6.5.8-arch1-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Plasma 6 was compiled with kdesrc-build. This is a clean compile, from scratch, using simple kdesrc-build workspace.

Running System Settings from the terminal, I see two relevant errors.

The first when opening the avatar list:

qrc:/qt/qml/org/kde/kirigamiaddons/components/Avatar.qml:201:9: QML QQuickImage: Cannot open: file:///home/blumen/.face?0

The second after clicking ok in the dialog:

qrc:/kcm/kcm_users/PicturesSheet.qml:137: Error: Cannot assign [undefined] to QUrl
Comment 1 guimarcalsilva 2023-10-28 00:22:15 UTC
I can reproduce it on Neon Unstable.
Comment 2 guimarcalsilva 2023-10-28 00:31:18 UTC
I also noticed choosing a color for the default user avatar or for the user letter also doesn't work. Clicking one of the options does nothing. The terminal says:

qrc:/kcm/kcm_users/PicturesSheet.qml243 (also on line 272): ReferenceError: colourRectangle is not defined.
Comment 3 Nate Graham 2023-10-30 17:48:19 UTC
Git commit b5c5a43280a4afb91d47da00a1f2984365da4885 by Nate Graham.
Committed on 30/10/2023 at 18:46.
Pushed by ngraham into branch 'master'.

kcms/users: use correct property for URL returned from file dialog

`fileUrl` changed to `selectedFile` in Qt6.

M  +1    -1    kcms/users/src/ui/PicturesSheet.qml

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