use QCoreApplication.instance instead of passing the instance through several objects

This commit is contained in:
dries.k
2023-05-30 20:53:25 +02:00
parent a7f5534c6b
commit 4eceae5a40
6 changed files with 14 additions and 24 deletions

View File

@@ -27,13 +27,11 @@ class SettingsDialog(QtWidgets.QDialog, Ui_Dialog):
quit_requested = QtCore.pyqtSignal()
theme_change_requested = QtCore.pyqtSignal(str)
def __init__(self, app: QtWidgets.QApplication):
def __init__(self):
super(SettingsDialog, self).__init__()
self.setupUi(self)
self.setWindowTitle("Settings")
self.app = app
self.settings_changed = False
self.changes_applied = False
self.server_changed = False
@@ -91,7 +89,6 @@ class SettingsDialog(QtWidgets.QDialog, Ui_Dialog):
def add_message_widget(self):
self.message_widget = MessageWidget(
self.app,
self,
MessagesModelItem(
GotifyMessageModel(