delclare recentFiles as QStringList

This commit is contained in:
M2j 2010-06-11 15:26:24 +02:00
parent f524c7ff45
commit 06549eed0d

View File

@ -488,7 +488,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
self.displayManager = DisplayManager(screens) self.displayManager = DisplayManager(screens)
self.aboutForm = AboutForm(self, applicationVersion) self.aboutForm = AboutForm(self, applicationVersion)
self.settingsForm = SettingsForm(self.screens, self, self) self.settingsForm = SettingsForm(self.screens, self, self)
self.recentFiles = [] self.recentFiles = QtCore.QStringList()
# Set up the path with plugins # Set up the path with plugins
pluginpath = AppLocation.get_directory(AppLocation.PluginsDir) pluginpath = AppLocation.get_directory(AppLocation.PluginsDir)
self.plugin_manager = PluginManager(pluginpath) self.plugin_manager = PluginManager(pluginpath)
@ -851,8 +851,4 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
if filename and filename not in self.recentFiles: if filename and filename not in self.recentFiles:
self.recentFiles.insert(0, QtCore.QString(filename)) self.recentFiles.insert(0, QtCore.QString(filename))
while self.recentFiles.count() > recentFileCount: while self.recentFiles.count() > recentFileCount:
if isinstance(self.recentFiles, QtCore.QStringList):
self.recentFiles.removeLast() self.recentFiles.removeLast()
else:
self.recentFiles.pop()