[Icon] image path is not correctly resolved if used from within a qrc file

Bug #1184611 reported by Michael Zanetti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

If writing an application and putting all the QML files into a qrc file (I know, its discouraged, still, Qt supports it so it should work I'd say) the Icon {} component does not correctly resolve the paths to the image files.

Qt seems to have a mechanism that it always searches for icons in the current scope. That means, if having a QML file in a qrc and referring to an image with "/path/to/image.png" it actually resolves it as "qrc:///path/to/image.png". There is still the possiblity to directly point to the icon on disk using "file:///path/to/image.png".

The Icon component seems to suffer from this by not specifying the file:// uri scheme and the image gets searched only in the qrc. file. The Icon component should most likely always point to file:// when resolving images.

Tags: icons
Changed in ubuntu-ui-toolkit:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → Florian Boucault (fboucault)
tags: added: icons
Zsombor Egri (zsombi)
Changed in ubuntu-ui-toolkit:
assignee: Florian Boucault (fboucault) → nobody
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.