forked from openlp/openlp
Use documented list methods
This commit is contained in:
parent
d33a719172
commit
2e3b296d2d
@ -33,7 +33,8 @@ from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, \
|
|||||||
ThemeManager, SlideController, PluginForm, MediaDockManager, DisplayManager
|
ThemeManager, SlideController, PluginForm, MediaDockManager, DisplayManager
|
||||||
from openlp.core.lib import RenderManager, build_icon, OpenLPDockWidget, \
|
from openlp.core.lib import RenderManager, build_icon, OpenLPDockWidget, \
|
||||||
SettingsManager, PluginManager, Receiver, translate
|
SettingsManager, PluginManager, Receiver, translate
|
||||||
from openlp.core.utils import check_latest_version, AppLocation, add_actions, LanguageManager
|
from openlp.core.utils import check_latest_version, AppLocation, add_actions, \
|
||||||
|
LanguageManager
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -61,7 +62,8 @@ class VersionThread(QtCore.QThread):
|
|||||||
QtCore.QThread.__init__(self, parent)
|
QtCore.QThread.__init__(self, parent)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.app_version = app_version
|
self.app_version = app_version
|
||||||
self.version_splitter = re.compile(r'([0-9]+).([0-9]+).([0-9]+)(?:-bzr([0-9]+))')
|
self.version_splitter = re.compile(
|
||||||
|
r'([0-9]+).([0-9]+).([0-9]+)(?:-bzr([0-9]+))')
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
"""
|
"""
|
||||||
@ -842,7 +844,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
|||||||
recentFileCount = QtCore.QSettings().value(
|
recentFileCount = QtCore.QSettings().value(
|
||||||
self.generalSettingsSection + u'/max recent files',
|
self.generalSettingsSection + u'/max recent files',
|
||||||
QtCore.QVariant(4)).toInt()[0]
|
QtCore.QVariant(4)).toInt()[0]
|
||||||
if filename and not self.recentFiles.contains(filename):
|
if filename and filename not in self.recentFiles:
|
||||||
self.recentFiles.prepend(QtCore.QString(filename))
|
self.recentFiles.insert(0, QtCore.QString(filename))
|
||||||
while self.recentFiles.count() > recentFileCount:
|
while self.recentFiles.count() > recentFileCount:
|
||||||
self.recentFiles.takeLast()
|
self.recentFiles.pop()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user