Bug 471496

Summary: Cannot preview global themes
Product: [Applications] systemsettings Reporter: Patrick Silva <bugseforuns>
Component: kcm_lookandfeelAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: justin.zobel, nate
Priority: NOR Keywords: qt6
Version First Reported In: master   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.0
Sentry Crash Report:
Attachments: screenshot

Description Patrick Silva 2023-06-27 11:07:15 UTC
Created attachment 159923 [details]
screenshot

STEPS TO REPRODUCE
1. open Global Theme KCM
2. click on the button used to preview any global theme
3. 

OBSERVED RESULT
the global theme is not previews, as observed in the attached screenhot

EXPECTED RESULT
preview of the global theme

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.1
Graphics Platform: Wayland
Comment 1 Justin Zobel 2023-06-29 04:21:27 UTC
Can also confirm the same behaviour.
Comment 2 Nate Graham 2023-07-01 13:09:20 UTC
Aha, it's the "Qt6 automatically prepends qrc:/" issue:

qrc:/kcm/kcm_lookandfeel/main.qml:209:13: QML QQuickImage: Cannot open: qrc:/home/nate/kde/usr6/share/plasma/look-and-feel/org.kde.breeze.desktop/contents/previews/fullscreenpreview.jpg

Let's see if I can fix it.
Comment 3 Nate Graham 2023-07-01 13:14:33 UTC
Git commit 6e8d604c1c3970c370b6e173b08a12a491f2ab4b by Nate Graham.
Committed on 01/07/2023 at 13:12.
Pushed by ngraham into branch 'master'.

kcms/lookandfeel: un-break preview images

In Qt 6, we need to prepend "file:/" to paths passed as URLs, or else Qt
automatically prepends "qrc:/" and breaks them.
FIXED-IN: 6.0

M  +1    -1    kcms/lookandfeel/ui/main.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/6e8d604c1c3970c370b6e173b08a12a491f2ab4b