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

Kai Uwe Broulik noreply at phabricator.kde.org
Wed Aug 14 08:51:47 BST 2019


broulik created this revision.
broulik added reviewers: vonreth, pali, antlarr, bruns.
Herald added projects: Dolphin, Frameworks.
Herald added subscribers: kfm-devel, kde-frameworks-devel.
broulik requested review of this revision.

REVISION 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
  F7246563: Screenshot_20190814_094956.png <https://phabricator.kde.org/F7246563>
  :D

REPOSITORY
  R320 KIO Extras

REVISION DETAIL
  https://phabricator.kde.org/D23145

AFFECTED FILES
  thumbnail/icoutils_wrestool.cpp

To: broulik, vonreth, pali, antlarr, bruns
Cc: kde-frameworks-devel, kfm-devel, aprcela, vmarinescu, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190814/5d038dac/attachment.htm>


More information about the kfm-devel mailing list