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

Review Request #127713 - Created April 22, 2016 and submitted

Information
Wolfgang Bauer
dolphin
Applications/16.04, master
358958, 361034
Reviewers
dolphin

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.

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.

Files


Emmanuel Pescosta
Wolfgang Bauer
Wolfgang Bauer
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 44d4d2ea715719a08c639541530a5b330647297d by Wolfgang Bauer to branch Applications/16.04.
Loading...