title: QFileIconProvider returns the same icon regardless of file
body: <p>I am developing an application using PySide (which wraps the Qt 4.8 framework). I need to display icons of applications associated with certain file extensions, and I am using <code>QFileIconProvider</code> for this. On Windows, my code works perfectly - every file extension is displayed along with the icon of the appropriate application. However, on Linux Ubuntu (14.04.1), the same code displays the icon for an unknown file extension for all the file extensions I try.</p>
  
  <p>Anyone know why this is happening? Here is the code:</p>
  
  <pre><code>from PySide import QtCore, QtGui
  
  # Use the appropriate path module when running on Windows.
  path = None
  import os
  if os.name == "nt":
      path = __import__("ntpath")
  else:
      path = os.path
  
  
  class MyWidget(QtGui.QWidget):
      def __init__(self, *args, **kwargs):
          # ...
          # ...
          self.file_ext_to_icon = {}
  
      def get_icon(self, fpath):
          _, file_ext = path.splitext(fpath)
          file_ext = file_ext.replace(".", "")
          if file_ext in self.file_ext_to_icon:
              return self.file_ext_to_icon[file_ext]
          if path.exists(fpath):
              icon = QtGui.QFileIconProvider().icon(QtCore.QFileInfo(fpath))
          else:
              temp_fpath = path.join(os.getcwd(), "myappname_temp.%s" % file_ext)
              if not path.exists(temp_fpath):
                  with open(temp_fpath, "wb") as _:
                      pass
              icon = QtGui.QFileIconProvider().icon(QtCore.QFileInfo(temp_fpath))
              os.remove(temp_fpath)
          if icon.isNull():
              # Use a custom default file icon from the resources file. Note that
              # this is different from the default file icon given by the OS.
              icon = QtGui.QIcon(":images/default_file_icon.png")
          self.file_ext_to_icon[file_ext] = icon
          return icon
  </code></pre>