From 25e7df079b0b559b5adfef5c8377048ea8d7b7ae Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Thu, 18 Jul 2013 21:04:38 +0200 Subject: [PATCH] changed constructor --- openlp/core/lib/spelltextedit.py | 4 ++-- openlp/plugins/custom/lib/customtab.py | 4 ++-- openlp/plugins/songs/forms/__init__.py | 2 +- openlp/plugins/songs/forms/authorsform.py | 2 +- openlp/plugins/songs/forms/editsongdialog.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openlp/core/lib/spelltextedit.py b/openlp/core/lib/spelltextedit.py index e4fa5fa4e..19adc61ad 100644 --- a/openlp/core/lib/spelltextedit.py +++ b/openlp/core/lib/spelltextedit.py @@ -177,7 +177,7 @@ class Highlighter(QtGui.QSyntaxHighlighter): """ Constructor """ - QtGui.QSyntaxHighlighter.__init__(self, *args) + super(Highlighter, self).__init__(*args) self.spelling_dictionary = None def highlightBlock(self, text): @@ -205,5 +205,5 @@ class SpellAction(QtGui.QAction): """ Constructor """ - QtGui.QAction.__init__(self, *args) + super(SpellAction, self).__init__(*args) self.triggered.connect(lambda x: self.correct.emit(self.text())) diff --git a/openlp/plugins/custom/lib/customtab.py b/openlp/plugins/custom/lib/customtab.py index dad7e7b47..29ae1c829 100644 --- a/openlp/plugins/custom/lib/customtab.py +++ b/openlp/plugins/custom/lib/customtab.py @@ -41,7 +41,7 @@ class CustomTab(SettingsTab): CustomTab is the Custom settings tab in the settings dialog. """ def __init__(self, parent, title, visible_title, icon_path): - SettingsTab.__init__(self, parent, title, visible_title, icon_path) + super(CustomTab, self).__init__(parent, title, visible_title, icon_path) def setupUi(self): self.setObjectName(u'CustomTab') @@ -97,4 +97,4 @@ class CustomTab(SettingsTab): settings.endGroup() if self.tab_visited: self.settings_form.register_post_process(u'custom_config_updated') - self.tab_visited = False \ No newline at end of file + self.tab_visited = False diff --git a/openlp/plugins/songs/forms/__init__.py b/openlp/plugins/songs/forms/__init__.py index 588f359f6..0018ca96a 100644 --- a/openlp/plugins/songs/forms/__init__.py +++ b/openlp/plugins/songs/forms/__init__.py @@ -45,7 +45,7 @@ mentioned above, like so:: class AuthorsForm(QtGui.QDialog, Ui_AuthorsDialog): def __init__(self, parent=None): - QtGui.QDialog.__init__(self, parent) + super(AuthorsForm, self).__init__(parent) self.setupUi(self) This allows OpenLP to use ``self.object`` for all the GUI elements while keeping diff --git a/openlp/plugins/songs/forms/authorsform.py b/openlp/plugins/songs/forms/authorsform.py index 2d94ad3da..2548fd23b 100644 --- a/openlp/plugins/songs/forms/authorsform.py +++ b/openlp/plugins/songs/forms/authorsform.py @@ -42,7 +42,7 @@ class AuthorsForm(QtGui.QDialog, Ui_AuthorsDialog): """ Set up the screen and common data """ - QtGui.QDialog.__init__(self, parent) + super(AuthorsForm, self).__init__(parent) self.setupUi(self) self.auto_display_name = False self.first_name_edit.textEdited.connect(self.on_first_name_edited) diff --git a/openlp/plugins/songs/forms/editsongdialog.py b/openlp/plugins/songs/forms/editsongdialog.py index 19dad3eae..71aebd0c3 100644 --- a/openlp/plugins/songs/forms/editsongdialog.py +++ b/openlp/plugins/songs/forms/editsongdialog.py @@ -355,7 +355,7 @@ class SingleColumnTableWidget(QtGui.QTableWidget): """ Constructor """ - QtGui.QTableWidget.__init__(self, parent) + super(SingleColumnTableWidget, self).__init__(parent) self.horizontalHeader().setVisible(False) self.setColumnCount(1)