[Exe Thumbnailer] Match 16 bit executables and don't request icon types wrestool cannot handle

Authored by broulik on Aug 14 2019, 7:51 AM.



16 bit executables don't have --language in their output.
While at it, port to QRegularExpression and just do a global match rather than splitting the output into individual lines.
Since the name is captured very fuzzy (it can include spaces, too), I couldn't just do an optional match but had to do two specific matches for with and without --language.
Also, somewhat fix the individual icon selection which looks broken but doesn't appear to be used anyway.

Moreover, only extract icon groups (type 14). I checked wrestool source code[1] and it cannot actually decode single icons (type 3) nor cursors (type 1). Calling it with --raw usually creates .dib files which don't appear to be proper bitmaps and fail to generate thumbnails.

[1] https://github.com/Lampus/icoutils/blob/master/wrestool/extract.c#L93

Test Plan


Diff Detail

R320 KIO Extras
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Aug 14 2019, 7:51 AM
Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptAug 14 2019, 7:51 AM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Aug 14 2019, 7:51 AM
apol added a subscriber: apol.Aug 14 2019, 11:00 PM

There's several unrealated changes I'd discourage but the patch looks good overall. +1



broulik updated this revision to Diff 64777.Aug 27 2019, 9:40 PM
  • Minimize unrelated changes...
This revision was not accepted when it landed; it landed in state Needs Review.Sep 16 2019, 3:41 PM
This revision was automatically updated to reflect the committed changes.