Don't call killApp() on aboutToQuit, only check IRC thread instead.
Qt6.5 seems to call aboutToQuit a whole bunch of times?
This commit is contained in:
parent
e554999978
commit
21defc2e55
1 changed files with 8 additions and 4 deletions
|
@ -3497,6 +3497,7 @@ class PesterWindow(MovingWindow):
|
||||||
|
|
||||||
@QtCore.pyqtSlot()
|
@QtCore.pyqtSlot()
|
||||||
def killApp(self):
|
def killApp(self):
|
||||||
|
PchumLog.info("killApp() called")
|
||||||
self.disconnectIRC.emit()
|
self.disconnectIRC.emit()
|
||||||
self.parent.trayicon.hide()
|
self.parent.trayicon.hide()
|
||||||
self.app.quit()
|
self.app.quit()
|
||||||
|
@ -4065,10 +4066,13 @@ class MainProgram(QtCore.QObject):
|
||||||
self.app.aboutToQuit.connect(self.death)
|
self.app.aboutToQuit.connect(self.death)
|
||||||
|
|
||||||
def death(self):
|
def death(self):
|
||||||
# app murder in progress
|
"""app murder in progress, kill the IRC thread if it didnt die already."""
|
||||||
# print("death inbound")
|
PchumLog.debug("death inbound")
|
||||||
if hasattr(self, "widget"):
|
if hasattr(self, "irc"):
|
||||||
self.widget.killApp()
|
if self.irc:
|
||||||
|
if self.irc.isRunning():
|
||||||
|
PchumLog.debug("Calling exit() on IRC thread.")
|
||||||
|
self.irc.exit()
|
||||||
|
|
||||||
# def lastWindow(self):
|
# def lastWindow(self):
|
||||||
# print("all windows closed")
|
# print("all windows closed")
|
||||||
|
|
Loading…
Reference in a new issue