From 06549eed0d418ab659e686e11e5db911831ad447 Mon Sep 17 00:00:00 2001 From: M2j Date: Fri, 11 Jun 2010 15:26:24 +0200 Subject: [PATCH] delclare recentFiles as QStringList --- openlp/core/ui/mainwindow.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 21dc4b67a..02bc9aff0 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -488,7 +488,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): self.displayManager = DisplayManager(screens) self.aboutForm = AboutForm(self, applicationVersion) self.settingsForm = SettingsForm(self.screens, self, self) - self.recentFiles = [] + self.recentFiles = QtCore.QStringList() # Set up the path with plugins pluginpath = AppLocation.get_directory(AppLocation.PluginsDir) self.plugin_manager = PluginManager(pluginpath) @@ -851,8 +851,4 @@ 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: - if isinstance(self.recentFiles, QtCore.QStringList): - self.recentFiles.removeLast() - else: - self.recentFiles.pop() - + self.recentFiles.removeLast()