Skip to content

applets/userswitcher: Define file:// schema for avatars

Blazer Silving requested to merge (removed):user-switcher-avatars into master

For some time the Userswitcher applet has had issues sourcing other user's avatars.

UserSwitcher-Avatars

Watching plasmashell output reveals an interesting clue. Each user entry that possesses an avatar will output:

qrc:/qt/qml/org/kde/kirigamiaddons/components/Avatar.qml:201:9: QML QQuickImage: Cannot open: qrc:/var/lib/AccountsService/icons/account1
qrc:/qt/qml/org/kde/kirigamiaddons/components/Avatar.qml:201:9: QML QQuickImage: Cannot open: qrc:/var/lib/AccountsService/icons/account2
qrc:/qt/qml/org/kde/kirigamiaddons/components/Avatar.qml:201:9: QML QQuickImage: Cannot open: qrc:/var/lib/AccountsService/icons/account3

This seems to be a quick fix involving AccountService paths. model.icon is returned as /var/lib/AccountsService/icons/account1 if an image is defined, but this is being prefixed with qrc:.

Prefixing the path with file:// solves the issue, checked in the Kirigami channel on Matrix and it seems concatenating a string is the way to go here. Example from LockScreenUI.qml, where the same interaction is prefixed with the proper schema.

This is ready to test, thanks!

Edited by Blazer Silving

Merge request reports

Loading