From 5fb36b5ef79864f76d6393b9d4f73add25cecb64 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Thu, 18 Jul 2013 16:32:23 +0200 Subject: [PATCH] updated constructor --- openlp/core/ui/servicemanager.py | 2 +- openlp/core/ui/shortcutlistform.py | 2 +- openlp/core/ui/slidecontroller.py | 2 +- openlp/core/ui/wizard.py | 2 +- openlp/plugins/alerts/forms/alertform.py | 1 + openlp/plugins/alerts/lib/alertsmanager.py | 2 +- 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 839d2b571..8af2f2106 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -61,7 +61,7 @@ class ServiceManagerList(QtGui.QTreeWidget): """ Constructor """ - QtGui.QTreeWidget.__init__(self, parent) + super(ServiceManagerList, self).__init__(parent) self.serviceManager = serviceManager def keyPressEvent(self, event): diff --git a/openlp/core/ui/shortcutlistform.py b/openlp/core/ui/shortcutlistform.py index 95a591e6d..0916eba81 100644 --- a/openlp/core/ui/shortcutlistform.py +++ b/openlp/core/ui/shortcutlistform.py @@ -52,7 +52,7 @@ class ShortcutListForm(QtGui.QDialog, Ui_ShortcutListDialog): """ Constructor """ - QtGui.QDialog.__init__(self, parent) + super(ShortcutListForm, self).__init__(parent) self.setupUi(self) self.changedActions = {} self.action_list = ActionList.get_instance() diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py index 6e48f4571..70b816822 100644 --- a/openlp/core/ui/slidecontroller.py +++ b/openlp/core/ui/slidecontroller.py @@ -90,7 +90,7 @@ class SlideController(DisplayController): """ Set up the Slide Controller. """ - DisplayController.__init__(self, parent, is_live) + super(SlideController, self).__init__(parent, is_live) Registry().register_function(u'bootstrap_post_set_up', self.screen_size_changed) self.screens = ScreenList() try: diff --git a/openlp/core/ui/wizard.py b/openlp/core/ui/wizard.py index ca89808ff..6cfe7f624 100644 --- a/openlp/core/ui/wizard.py +++ b/openlp/core/ui/wizard.py @@ -96,7 +96,7 @@ class OpenLPWizard(QtGui.QWizard): """ Constructor """ - QtGui.QWizard.__init__(self, parent) + super(OpenLPWizard, self).__init__(parent) self.plugin = plugin self.with_progress_page = add_progress_page self.setObjectName(name) diff --git a/openlp/plugins/alerts/forms/alertform.py b/openlp/plugins/alerts/forms/alertform.py index d1f5361d0..20932624e 100644 --- a/openlp/plugins/alerts/forms/alertform.py +++ b/openlp/plugins/alerts/forms/alertform.py @@ -46,6 +46,7 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog): self.manager = plugin.manager self.plugin = plugin self.item_id = None + # TODO: Use Registry() super(AlertForm, self).__init__(self.plugin.main_window) self.setupUi(self) self.display_button.clicked.connect(self.on_display_clicked) diff --git a/openlp/plugins/alerts/lib/alertsmanager.py b/openlp/plugins/alerts/lib/alertsmanager.py index a319f5c74..0318c37e4 100644 --- a/openlp/plugins/alerts/lib/alertsmanager.py +++ b/openlp/plugins/alerts/lib/alertsmanager.py @@ -48,7 +48,7 @@ class AlertsManager(QtCore.QObject): log.info(u'Alert Manager loaded') def __init__(self, parent): - QtCore.QObject.__init__(self, parent) + super(AlertsManager, self).__init__(parent) Registry().register(u'alerts_manager', self) self.timer_id = 0 self.alert_list = []