On start without configuration recentFiles might become a python list

This commit is contained in:
M2j 2010-06-11 15:11:50 +02:00
parent 69c6e0ef02
commit f524c7ff45
1 changed files with 4 additions and 1 deletions

View File

@ -851,5 +851,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
if filename and filename not in self.recentFiles:
self.recentFiles.insert(0, QtCore.QString(filename))
while self.recentFiles.count() > recentFileCount:
self.recentFiles.removeLast()
if isinstance(self.recentFiles, QtCore.QStringList):
self.recentFiles.removeLast()
else:
self.recentFiles.pop()