Review Request 127713: Specify the generic "unknown" icon as fallback to QIcon::fromTheme()

Wolfgang Bauer wbauer at tmo.at
Fri Apr 22 21:30:36 BST 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127713/
-----------------------------------------------------------

(Updated April 22, 2016, 10:30 nachm.)


Review request for Dolphin.


Changes
-------

Keep the fallback icon in a static variable


Bugs: 358958 and 361034
    https://bugs.kde.org/show_bug.cgi?id=358958
    https://bugs.kde.org/show_bug.cgi?id=361034


Repository: dolphin


Description
-------

The default fallback of QIcon::fromTheme() is QIcon(), i.e. a null icon. Set the generic "unknown" icon as fallback to prevent missing icons for filetypes that specify an icon name that doesn't exist.

This also gets rid of "QPixmap::scaled: Pixmap is a null pixmap" warnings in that case.


Diffs (updated)
-----

  src/kitemviews/kstandarditemlistwidget.cpp 66131d5 

Diff: https://git.reviewboard.kde.org/r/127713/diff/


Testing
-------

Open a folder that contains files whose filetype specifies an nonexistent icon name (/dev/ contains a lot of those here).
They show up using the generic "unknown" icon now, see attached screenshots.


File Attachments
----------------

without the patch
  https://git.reviewboard.kde.org/media/uploaded/files/2016/04/22/aec678ba-5769-4fc8-8632-6f5fba301652__before.png
same folder with the patch
  https://git.reviewboard.kde.org/media/uploaded/files/2016/04/22/d2201425-a987-4611-812a-ae50ed24b32e__after.png


Thanks,

Wolfgang Bauer

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20160422/c5ebee42/attachment.htm>


More information about the kfm-devel mailing list