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

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

Details

Summary

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


:D

Diff Detail

Repository
R320 KIO Extras
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Wed, Aug 14, 7:51 AM
Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptWed, Aug 14, 7:51 AM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Wed, Aug 14, 7:51 AM
apol added a subscriber: apol.Wed, Aug 14, 11:00 PM

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

thumbnail/icoutils_wrestool.cpp
78

startsWith()