Skip to content

Inconsistent algorithm for main icon detection #496

Closed
@kefir500

Description

@kefir500

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions