From e554999978954983f8960f2534b9f692ddd63ad1 Mon Sep 17 00:00:00 2001 From: Dpeta <69427753+Dpeta@users.noreply.github.com> Date: Thu, 20 Apr 2023 22:19:12 +0200 Subject: [PATCH 1/4] Update requirements Silly Qt6 6.4.0 <--> 6.4.2 windows audio bug out to be fixed now. --- requirements-qt5.txt | 6 ++---- requirements.txt | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/requirements-qt5.txt b/requirements-qt5.txt index f8110a3..a6c301a 100644 --- a/requirements-qt5.txt +++ b/requirements-qt5.txt @@ -1,4 +1,2 @@ -certifi==2022.12.7 -PyQt5==5.15.7 -PyQt5-Qt5==5.15.2 -PyQt5-sip==12.11.0 +PyQt5 +certifi diff --git a/requirements.txt b/requirements.txt index 523ca69..2f802bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,2 @@ -certifi==2022.12.7 -PyQt6==6.4.0 -PyQt6-Qt6==6.4.0 -PyQt6-sip==13.4.0 \ No newline at end of file +PyQt6 +certifi From 21defc2e55e5df9520976062401cb1f7f663061f Mon Sep 17 00:00:00 2001 From: Dpeta <69427753+Dpeta@users.noreply.github.com> Date: Thu, 20 Apr 2023 22:42:49 +0200 Subject: [PATCH 2/4] Don't call killApp() on aboutToQuit, only check IRC thread instead. Qt6.5 seems to call aboutToQuit a whole bunch of times? --- pesterchum.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pesterchum.py b/pesterchum.py index 9e6a66a..d4e8332 100755 --- a/pesterchum.py +++ b/pesterchum.py @@ -3497,6 +3497,7 @@ class PesterWindow(MovingWindow): @QtCore.pyqtSlot() def killApp(self): + PchumLog.info("killApp() called") self.disconnectIRC.emit() self.parent.trayicon.hide() self.app.quit() @@ -4065,10 +4066,13 @@ class MainProgram(QtCore.QObject): self.app.aboutToQuit.connect(self.death) def death(self): - # app murder in progress - # print("death inbound") - if hasattr(self, "widget"): - self.widget.killApp() + """app murder in progress, kill the IRC thread if it didnt die already.""" + PchumLog.debug("death inbound") + if hasattr(self, "irc"): + if self.irc: + if self.irc.isRunning(): + PchumLog.debug("Calling exit() on IRC thread.") + self.irc.exit() # def lastWindow(self): # print("all windows closed") From 06a71899ddaa518273822bcb888644ac34a65da1 Mon Sep 17 00:00:00 2001 From: Dpeta <69427753+Dpeta@users.noreply.github.com> Date: Wed, 3 May 2023 19:22:15 +0200 Subject: [PATCH 3/4] Remove section causing issues with pylint --- convo.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/convo.py b/convo.py index 93bfe5c..ca3fe4e 100644 --- a/convo.py +++ b/convo.py @@ -999,10 +999,6 @@ class PesterConvo(QtWidgets.QFrame): def closeEvent(self, event): self.mainwindow.waitingMessages.messageAnswered(self.title()) - for movie in self.textArea.urls.copy(): - movie.setFileName("") # Required, sometimes, for some reason. . . - movie.stop() - del movie self.windowClosed.emit(self.title()) def setChumOpen(self, o): From b644055dc01910929fabb6871d16be478111e186 Mon Sep 17 00:00:00 2001 From: Dpeta <69427753+Dpeta@users.noreply.github.com> Date: Wed, 3 May 2023 19:29:09 +0200 Subject: [PATCH 4/4] Use dict literal instead of call to dict() in toasts.py --- toast.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/toast.py b/toast.py index 66afb06..519b1d1 100644 --- a/toast.py +++ b/toast.py @@ -232,7 +232,13 @@ class ToastMachine: class PesterToast(QtWidgets.QWidget, DefaultToast): def __init__(self, machine, title, msg, icon, time=3000, parent=None): # FIXME: Not sure how this works exactly either xd, can't we init the parents seperately? - kwds = dict(parent=parent, machine=machine, title=title, msg=msg, icon=icon) + kwds = { + "parent": parent, + "machine": machine, + "title": title, + "msg": msg, + "icon": icon, + } super().__init__(**kwds) self.machine = machine