Clean up class initialisation

This commit is contained in:
Veronica Berglyd Olsen
2022-10-11 23:17:58 +02:00
parent 1f05e90266
commit 5d6778be57
36 changed files with 109 additions and 109 deletions
+3 -3
View File
@@ -66,7 +66,7 @@ class GuiBuildNovel(QDialog):
FMT_JSON_M = 9 # nW Markdown wrapped in JSON
def __init__(self, mainGui):
QDialog.__init__(self, mainGui)
super().__init__(parent=mainGui)
logger.debug("Initialising GuiBuildNovel ...")
self.setObjectName("GuiBuildNovel")
@@ -1194,7 +1194,7 @@ class GuiBuildNovel(QDialog):
class GuiBuildNovelDocView(QTextBrowser):
def __init__(self, mainGui, theProject):
QTextBrowser.__init__(self, mainGui)
super().__init__(parent=mainGui)
logger.debug("Initialising GuiBuildNovelDocView ...")
@@ -1343,7 +1343,7 @@ class GuiBuildNovelDocView(QTextBrowser):
def resizeEvent(self, theEvent):
"""Make sure the document title is the same width as the window.
"""
QTextBrowser.resizeEvent(self, theEvent)
super().resizeEvent(theEvent)
self._updateDocMargins()
return
+1 -1
View File
@@ -43,7 +43,7 @@ logger = logging.getLogger(__name__)
class GuiLipsum(QDialog):
def __init__(self, mainGui):
QDialog.__init__(self, mainGui)
super().__init__(parent=mainGui)
logger.debug("Initialising GuiLipsum ...")
self.setObjectName("GuiLipsum")
+8 -8
View File
@@ -49,7 +49,7 @@ PAGE_FINAL = 4
class GuiProjectWizard(QWizard):
def __init__(self, mainGui):
QWizard.__init__(self, mainGui)
super().__init__(parent=mainGui)
logger.debug("Initialising GuiProjectWizard ...")
self.setObjectName("GuiProjectWizard")
@@ -88,7 +88,7 @@ class GuiProjectWizard(QWizard):
class ProjWizardIntroPage(QWizardPage):
def __init__(self, theWizard):
QWizardPage.__init__(self)
super().__init__()
self.mainConf = novelwriter.CONFIG
self.theWizard = theWizard
@@ -158,7 +158,7 @@ class ProjWizardIntroPage(QWizardPage):
class ProjWizardFolderPage(QWizardPage):
def __init__(self, theWizard):
QWizardPage.__init__(self)
super().__init__()
self.mainConf = novelwriter.CONFIG
self.theWizard = theWizard
@@ -209,7 +209,7 @@ class ProjWizardFolderPage(QWizardPage):
"""Check that the selected path isn't already being used.
"""
self.errLabel.setText("")
if not QWizardPage.isComplete(self):
if not super().isComplete():
return False
setPath = os.path.abspath(os.path.expanduser(self.projPath.text()))
@@ -259,7 +259,7 @@ class ProjWizardFolderPage(QWizardPage):
class ProjWizardPopulatePage(QWizardPage):
def __init__(self, theWizard):
QWizardPage.__init__(self)
super().__init__()
self.mainConf = novelwriter.CONFIG
self.theWizard = theWizard
@@ -315,7 +315,7 @@ class ProjWizardPopulatePage(QWizardPage):
class ProjWizardCustomPage(QWizardPage):
def __init__(self, theWizard):
QWizardPage.__init__(self)
super().__init__()
self.mainConf = novelwriter.CONFIG
self.theWizard = theWizard
@@ -397,7 +397,7 @@ class ProjWizardCustomPage(QWizardPage):
class ProjWizardFinalPage(QWizardPage):
def __init__(self, theWizard):
QWizardPage.__init__(self)
super().__init__()
self.mainConf = novelwriter.CONFIG
self.theWizard = theWizard
@@ -418,7 +418,7 @@ class ProjWizardFinalPage(QWizardPage):
def initializePage(self):
"""Update the summary information on the final page.
"""
QWizardPage.initializePage(self)
super().initializePage()
sumList = []
sumList.append(self.tr("Project Name: {0}").format(self.field("projName")))
+1 -1
View File
@@ -58,7 +58,7 @@ class GuiWritingStats(QDialog):
FMT_CSV = 1
def __init__(self, mainGui):
QDialog.__init__(self, mainGui)
super().__init__(parent=mainGui)
logger.debug("Initialising GuiWritingStats ...")
self.setObjectName("GuiWritingStats")