Use YQUI icon loader in YQImage whenever possible #100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Trello
https://trello.com/c/5fgf38AA/
Bugzilla
https://bugzilla.suse.com/show_bug.cgi?id=1119688
https://bugzilla.suse.com/show_bug.cgi?id=1122174
Problem
Header icons for all the views of the partitioner were gone after the migration to theme icons and SVGs.
Cause and Fix
The YQImage had used an inconsistent approach to load the icons: If they could not be found in the desktop's theme, it would prepend
:/
and append.svg
to try to load them from the compiled-in Qt resource files, resulting in a path:/myicon.svg
.But that was wrong: It should have been either
:/myicon
or:/icons/myicon.svg
. All icons in that compiled-in resource file are in a subdirectoryicons/
with the.svg
suffix, and there are aliases in the icon description file for just the plain name (without the.svg
suffix).Worse, it was a lot of code duplication; the reference how to do that is now the new
YQUI::loadIcon()
method. This is now used unless the image is specified with an absolute path (i.e. starting (!) with a/
slash; but not:/
).This results in less code and more robust code.
Screenshots
(Notice the icons at the page headers)