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 = [] args = []
for a in self.arguments: for a in self.arguments:
args.extend([a]) args.extend([a])
self.serviceManagerContents.loadFile(unicode(args[0], filename = args[0]
sys.getfilesystemencoding())) if not isinstance(filename, unicode):
filename = unicode(filename, sys.getfilesystemencoding())
self.serviceManagerContents.loadFile(filename)
elif QtCore.QSettings().value( elif QtCore.QSettings().value(
self.generalSettingsSection + u'/auto open', self.generalSettingsSection + u'/auto open',
QtCore.QVariant(False)).toBool(): QtCore.QVariant(False)).toBool():