Added parent to all __init__()
This commit is contained in:
parent
9fc151b1c9
commit
a90642712b
@ -30,8 +30,8 @@ from . import ui_about # pylint: disable=no-name-in-module
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
class AboutDialog(ui_about.Ui_AboutDialog, QDialog):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
||||
self.setupUi(self)
|
||||
|
||||
@ -40,15 +40,13 @@ class AboutDialog(ui_about.Ui_AboutDialog, QDialog):
|
||||
self.release.setText(release_file.read())
|
||||
|
||||
self.ok.clicked.connect(self.accept)
|
||||
self.releaseNotes.clicked.connect(on_release_notes_clicked)
|
||||
self.informationNotes.clicked.connect(on_information_notes_clicked)
|
||||
self.releaseNotes.clicked.connect(self.on_release_notes_clicked)
|
||||
self.informationNotes.clicked.connect(self.on_information_notes_clicked)
|
||||
|
||||
def on_release_notes_clicked(self):
|
||||
release_notes_dialog = ReleaseNotesDialog(self)
|
||||
release_notes_dialog.exec_()
|
||||
|
||||
def on_release_notes_clicked():
|
||||
release_notes_dialog = ReleaseNotesDialog()
|
||||
release_notes_dialog.exec_()
|
||||
|
||||
|
||||
def on_information_notes_clicked():
|
||||
information_notes_dialog = InformationNotesDialog()
|
||||
information_notes_dialog.exec_()
|
||||
def on_information_notes_clicked(self):
|
||||
information_notes_dialog = InformationNotesDialog(self)
|
||||
information_notes_dialog.exec_()
|
||||
|
@ -29,8 +29,8 @@ import subprocess
|
||||
class InformationNotesDialog(ui_informationnotes.Ui_InformationNotesDialog,
|
||||
QDialog):
|
||||
# pylint: disable=too-few-public-methods
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
||||
self.setupUi(self)
|
||||
details = subprocess.check_output(
|
||||
|
@ -1275,7 +1275,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
|
||||
@pyqtSlot(name='on_action_createvm_triggered')
|
||||
def action_createvm_triggered(self):
|
||||
with common_threads.busy_cursor():
|
||||
create_window = create_new_vm.NewVmDlg(self.qt_app, self.qubes_app)
|
||||
create_window = create_new_vm.NewVmDlg(self.qt_app, self.qubes_app, self)
|
||||
create_window.exec_()
|
||||
|
||||
# noinspection PyArgumentList
|
||||
@ -1493,8 +1493,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
|
||||
try:
|
||||
with common_threads.busy_cursor():
|
||||
settings_window = settings.VMSettingsWindow(
|
||||
vm, init_page=tab, qapp=self.qt_app,
|
||||
qubesapp=self.qubes_app)
|
||||
vm, tab, self.qt_app, self.qubes_app, self)
|
||||
settings_window.show()
|
||||
self.settings_windows[vm.name] = settings_window
|
||||
except exc.QubesException as ex:
|
||||
@ -1597,7 +1596,8 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
|
||||
with common_threads.busy_cursor():
|
||||
global_settings_window = global_settings.GlobalSettingsWindow(
|
||||
self.qt_app,
|
||||
self.qubes_app)
|
||||
self.qubes_app,
|
||||
self)
|
||||
global_settings_window.show()
|
||||
self.settings_windows['global_settings_window'] = global_settings_window
|
||||
|
||||
@ -1620,7 +1620,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
|
||||
def action_restore_triggered(self):
|
||||
with common_threads.busy_cursor():
|
||||
restore_window = restore.RestoreVMsWindow(self.qt_app,
|
||||
self.qubes_app)
|
||||
self.qubes_app, self)
|
||||
restore_window.exec_()
|
||||
|
||||
# noinspection PyArgumentList
|
||||
@ -1670,7 +1670,7 @@ class VmManagerWindow(ui_qubemanager.Ui_VmManagerWindow, QMainWindow):
|
||||
# noinspection PyArgumentList
|
||||
@pyqtSlot(name='on_action_about_qubes_triggered')
|
||||
def action_about_qubes_triggered(self): # pylint: disable=no-self-use
|
||||
about = AboutDialog()
|
||||
about = AboutDialog(self)
|
||||
about.exec_()
|
||||
|
||||
def createPopupMenu(self): # pylint: disable=invalid-name
|
||||
|
@ -27,8 +27,8 @@ from . import ui_releasenotes # pylint: disable=no-name-in-module
|
||||
|
||||
class ReleaseNotesDialog(ui_releasenotes.Ui_ReleaseNotesDialog, QDialog):
|
||||
# pylint: disable=too-few-public-methods
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
|
||||
self.setupUi(self)
|
||||
|
||||
|
@ -35,7 +35,7 @@ class TemplateManagerWindow(
|
||||
|
||||
def __init__(self, qt_app, qubes_app, dispatcher, parent=None):
|
||||
# pylint: disable=unused-argument
|
||||
super().__init__()
|
||||
super().__init__(parent)
|
||||
self.setupUi(self)
|
||||
|
||||
self.qubes_app = qubes_app
|
||||
|
Loading…
Reference in New Issue
Block a user