summaryrefslogtreecommitdiff
path: root/silx/gui/dialog/SafeFileIconProvider.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/gui/dialog/SafeFileIconProvider.py')
-rw-r--r--silx/gui/dialog/SafeFileIconProvider.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/silx/gui/dialog/SafeFileIconProvider.py b/silx/gui/dialog/SafeFileIconProvider.py
index 7fac7c0..1e06b64 100644
--- a/silx/gui/dialog/SafeFileIconProvider.py
+++ b/silx/gui/dialog/SafeFileIconProvider.py
@@ -115,6 +115,10 @@ class SafeFileIconProvider(qt.QFileIconProvider):
return driveInfo[0]
def icon(self, info):
+ if isinstance(info, qt.QFileIconProvider.IconType):
+ # It's another C++ method signature:
+ # QIcon QFileIconProvider::icon(QFileIconProvider::IconType type)
+ return super(SafeFileIconProvider, self).icon(info)
style = qt.QApplication.instance().style()
path = info.filePath()
if path in ["", "/"]: