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

Inconsistent algorithm for main icon detection #496

Closed
kefir500 opened this issue Aug 27, 2021 · 1 comment
Closed

Inconsistent algorithm for main icon detection #496

kefir500 opened this issue Aug 27, 2021 · 1 comment

Comments

@kefir500
Copy link
Contributor

kefir500 commented Aug 27, 2021

While migrating from Ubuntu 16.04 to 18.04 in my CI/CD environment, I suddenly discovered that my AppImage main icon is now a 48x48 image instead of a larger one. I started digging and found a couple of inconsistencies.

Correct me if I'm wrong, but as I see it, the initial idea of the main icon detection is to prioritize some images over the others (256x256 over 48x48, SVG over XPM, etc.). However, the current algorithm is using the foreach/continue construction which reassigns the iconToBeUsed variable until the last available (not the best) candidate is met.

Furthermore, it seems that QDirIterator is using readdir() under the hood, which doesn't guarantee a specific order, so it fully depends on a filesystem implementation. I don't think linuxdeployqt should rely on a random order of this iteration.

If you confirm my assumptions on the icon priorities, I'm ready to submit a pull request fixing this issue.

@probonopd
Copy link
Owner

probonopd commented Aug 28, 2021

You are right, and I appreciate your change. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants