Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use YQUI icon loader in YQImage whenever possible #100

merged 6 commits into from Feb 28, 2019


None yet
3 participants
Copy link

shundhammer commented Feb 27, 2019




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 subdirectory icons/ 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.


(Notice the icons at the page headers)



This comment has been minimized.

Copy link

ancorgs commented Feb 27, 2019

Does this fix also applies to these other missing icons in the "configure" button?


This comment has been minimized.

Copy link
Contributor Author

shundhammer commented Feb 27, 2019

Does this fix also applies to these other missing icons in the "configure" button?

Pretty sure no. This is only for the YQImage widget. That other thing is a menu button.

But the problem might be the same there, and the fix should be even easier: Just use YQUI::loadIcon() consistently and not let that widget do its own thing.

I just checked: it does use YQUI::loadIcon(). So maybe the icon names are just wrong (using a suffix or a path?).

Copy link

lslezak left a comment


I do not know what's wrong with Travis, I can build the package locally, but build in Docker for some strange reason fails. You can merge it even with failing Travis.

@shundhammer shundhammer merged commit e849ec0 into libyui:master Feb 28, 2019

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed

@shundhammer shundhammer deleted the shundhammer:huha-partitioner-icons branch Feb 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.