'Reimplement Qt method'

@Slot(int)
@Slot(QFileInfo)
def icon(self, icontype_or_qfileinfo):

    if isinstance(icontype_or_qfileinfo, QFileIconProvider.IconType):
        return super(IconProvider, self).icon(icontype_or_qfileinfo)
    else:
        qfileinfo = icontype_or_qfileinfo
        fname = osp.normpath(to_text_string(qfileinfo.absoluteFilePath()))
        if osp.isdir(fname):
            return ima.icon('DirOpenIcon')
        else:
            basename = osp.basename(fname)
            (_, extension) = osp.splitext(basename)
            (mime_type, _) = mime.guess_type(basename)
            icon = ima.icon('FileIcon')
            if (extension in self.OFFICE_FILES):
                icon = ima.icon(self.OFFICE_FILES[extension])
            if (mime_type is not None):
                (file_type, bin_name) = mime_type.split('/')
                if (file_type == 'text'):
                    icon = ima.icon('TextFileIcon')
                elif (file_type == 'audio'):
                    icon = ima.icon('AudioFileIcon')
                elif (file_type == 'video'):
                    icon = ima.icon('VideoFileIcon')
                elif (file_type == 'image'):
                    icon = ima.icon('ImageFileIcon')
                elif (file_type == 'application'):
                    if (bin_name in self.application_icons):
                        icon = ima.icon(self.application_icons[bin_name])
            return icon
