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

2019-09-16 Thread Kai Uwe Broulik
This revision was not accepted when it landed; it landed in state "Needs 
Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit R320:920784722205: [Exe Thumbnailer] Match 16 bit executables 
and don't request icon types… (authored by broulik).

REPOSITORY
  R320 KIO Extras

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23145?vs=64777&id=66235

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

AFFECTED FILES
  thumbnail/icoutils_wrestool.cpp

To: broulik, vonreth, pali, antlarr, bruns
Cc: apol, kde-frameworks-devel, kfm-devel, iasensio, fprice, LeGast00n, MrPepe, 
fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, 
navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov


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

2019-09-15 Thread Kai Uwe Broulik
broulik added a comment.


  Ping

REPOSITORY
  R320 KIO Extras

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

To: broulik, vonreth, pali, antlarr, bruns
Cc: apol, kde-frameworks-devel, kfm-devel, iasensio, fprice, LeGast00n, MrPepe, 
fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, 
navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov


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

2019-08-27 Thread Kai Uwe Broulik
broulik updated this revision to Diff 64777.
broulik added a comment.


  - Minimize unrelated changes...

REPOSITORY
  R320 KIO Extras

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D23145?vs=63697&id=64777

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

AFFECTED FILES
  thumbnail/icoutils_wrestool.cpp

To: broulik, vonreth, pali, antlarr, bruns
Cc: apol, kde-frameworks-devel, kfm-devel, aprcela, vmarinescu, fprice, 
LeGast00n, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, 
michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, 
emmanuelp, mikesomov


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

2019-08-14 Thread Aleix Pol Gonzalez
apol added a comment.


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

INLINE COMMENTS

> icoutils_wrestool.cpp:78
>  
> -if ( name.at(0) == '\'' )
> -name = name.mid(1, name.size()-2);
> +if (name.at(0) == QLatin1Char('\'')) {
> +name = name.mid(1, name.length() - 2);

startsWith()

REPOSITORY
  R320 KIO Extras

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

To: broulik, vonreth, pali, antlarr, bruns
Cc: apol, kde-frameworks-devel, kfm-devel, aprcela, vmarinescu, fprice, 
LeGast00n, MrPepe, fbampaloukas, alexde, Codezela, feverfew, meven, michaelh, 
spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, 
mikesomov


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

2019-08-14 Thread Kai Uwe Broulik
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 

  :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