Even null icons are drawn so also reserve space for them to avoid overlapping.
Details
Details
- Reviewers
- None
- Group Reviewers
Frameworks - Commits
- R241:31361267d419: KFileItemDelegate: Always reserve space for icons
Diff Detail
Diff Detail
- Repository
- R241 KIO
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
It would be possible to avoid drawing null QIcons as well, but that would result in broken alignment.
Comment Actions
The underlying issue is that KIconLoader's implementation of isNull (in virtual_hook) is not really meaningful.
In cases where a name for a nonexistent icon is passed, pixmap will draw the "unknown" icon, but isNull still returns true.
So the question is whether this is intentional or not. The API doesn't really make that clear.
If isNull should return false iff pixmap returns something other than an empty pixmap, the implementation for KIconLoader
would probably always return false...
In any case, I still think this diff isn't wrong by itself as the drawing of the pixmap is still unconditional and so should be reflected
in the text margin.