Fix crashes after parent-child cleanup.
This commit is contained in:
parent
7dfd7d018b
commit
fe99cbc331
@ -136,7 +136,7 @@ class Application(QApplication):
|
||||
self.searchmanager = SearchManager(self)
|
||||
self.downloadmanager = DownloadManager(self)
|
||||
self.downloadmodel = DownloadModel(self.downloadmanager)
|
||||
self.mainwindow = MainWindow(self)
|
||||
self.mainwindow = MainWindow()
|
||||
|
||||
self.modeman.mainwindow = self.mainwindow
|
||||
self.installEventFilter(self.modeman)
|
||||
|
@ -46,7 +46,7 @@ class Progress(QProgressBar):
|
||||
}}
|
||||
"""
|
||||
|
||||
def __init__(self, parent):
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(parent)
|
||||
set_register_stylesheet(self)
|
||||
self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Ignored)
|
||||
|
@ -69,14 +69,9 @@ class Url(TextBase):
|
||||
}}
|
||||
"""
|
||||
|
||||
def __init__(self, bar, elidemode=Qt.ElideMiddle):
|
||||
"""Override TextBase::__init__ to elide in the middle by default.
|
||||
|
||||
Args:
|
||||
bar: The statusbar (parent) object.
|
||||
elidemode: How to elide the text.
|
||||
"""
|
||||
super().__init__(bar, elidemode)
|
||||
def __init__(self, parent=None):
|
||||
"""Override TextBase.__init__ to elide in the middle by default."""
|
||||
super().__init__(parent, Qt.ElideMiddle)
|
||||
self.setObjectName(self.__class__.__name__)
|
||||
set_register_stylesheet(self)
|
||||
self._hover_url = None
|
||||
|
Loading…
Reference in New Issue
Block a user