Fix the non-ascii check on Macs

bzr-revno: 1825
This commit is contained in:
Jon Tibble 2011-12-07 22:23:12 +00:00
commit e778531fb1

View File

@ -720,8 +720,10 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
args = []
for a in self.arguments:
args.extend([a])
self.serviceManagerContents.loadFile(unicode(args[0],
sys.getfilesystemencoding()))
filename = args[0]
if not isinstance(filename, unicode):
filename = unicode(filename, sys.getfilesystemencoding())
self.serviceManagerContents.loadFile(filename)
elif QtCore.QSettings().value(
self.generalSettingsSection + u'/auto open',
QtCore.QVariant(False)).toBool():