Source

thg-qt-mq / mani-iconisnull.diff

# HG changeset patch
# Parent 6d36a8ceb98a8bc71228cb659f0eb94931c453a3
manifestmodel: remove extra check for availability of file icon

QFileIconProvider.icon() should not return null QIcon as long as it is
a normal file.

diff --git a/tortoisehg/hgqt/manifestmodel.py b/tortoisehg/hgqt/manifestmodel.py
--- a/tortoisehg/hgqt/manifestmodel.py
+++ b/tortoisehg/hgqt/manifestmodel.py
@@ -112,8 +112,6 @@ class ManifestModel(QAbstractItemModel):
                     ic = self._icons.get(ext, None)
                     if not ic:
                         ic = self._fileiconprovider.icon(QFileInfo(self._wjoin(e.path)))
-                        if not ic.availableSizes():
-                            ic = self._fileicon
                         self._icons[ext] = ic
             e.seticon(ic)