From 62f3e21bd4699b04050b1d9ab3838aab9b2db28a Mon Sep 17 00:00:00 2001 From: Dpeta <69427753+Dpeta@users.noreply.github.com> Date: Sat, 25 Feb 2023 02:34:30 +0100 Subject: [PATCH] Don't subscript Qt signals (unsubscriptable-object) --- convo.py | 4 ++-- memos.py | 2 +- menus.py | 6 ++++-- pesterchum.py | 8 +++++--- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/convo.py b/convo.py index c2879f1..93bfe5c 100644 --- a/convo.py +++ b/convo.py @@ -386,7 +386,7 @@ class PesterText(QtWidgets.QTextEdit): self.setReadOnly(True) self.setMouseTracking(True) self.textSelected = False - self.copyAvailable[bool].connect(self.textReady) + self.copyAvailable.connect(self.textReady) # (bool yes) self.urls = {} self.lastmsg = None for k in smiledict: @@ -407,7 +407,7 @@ class PesterText(QtWidgets.QTextEdit): movie = PesterMovie(self) movie.setFileName(fileName) self.urls[movie] = url - movie.frameChanged[int].connect(movie.animate) + movie.frameChanged.connect(movie.animate) # (int frameNumber) """ @QtCore.pyqtSlot(bool) diff --git a/memos.py b/memos.py index 39f8f75..f4a3d0d 100644 --- a/memos.py +++ b/memos.py @@ -316,7 +316,7 @@ class MemoText(PesterText): self.setReadOnly(True) self.setMouseTracking(True) self.textSelected = False - self.copyAvailable[bool].connect(self.textReady) + self.copyAvailable.connect(self.textReady) # (bool yes) self.urls = {} for k in smiledict: self.addAnimation( diff --git a/menus.py b/menus.py index c19cc3c..69fc8e2 100644 --- a/menus.py +++ b/menus.py @@ -53,7 +53,9 @@ class PesterQuirkList(QtWidgets.QTreeWidget): self.mainwindow = mainwindow self.setStyleSheet("background:black; color:white;") - self.itemChanged[QtWidgets.QTreeWidgetItem, int].connect(self.changeCheckState) + self.itemChanged.connect( + self.changeCheckState + ) # [QtWidgets.QTreeWidgetItem, int] for q in mainwindow.userprofile.quirks: item = PesterQuirkItem(q) @@ -1960,7 +1962,7 @@ class PesterMemoList(QtWidgets.QDialog): self.channelarea.setColumnWidth(1, 10) self.channelarea.setSortingEnabled(True) self.channelarea.sortByColumn(0, QtCore.Qt.SortOrder.AscendingOrder) - self.channelarea.itemDoubleClicked[QtWidgets.QTreeWidgetItem, int].connect( + self.channelarea.itemDoubleClicked.connect( # [QtWidgets.QTreeWidgetItem, int] self.AcceptSelection ) diff --git a/pesterchum.py b/pesterchum.py index b750365..3a66518 100755 --- a/pesterchum.py +++ b/pesterchum.py @@ -473,7 +473,9 @@ class chumArea(RightClickTree): self.setAnimated(True) self.setRootIsDecorated(False) - self.itemDoubleClicked[QtWidgets.QTreeWidgetItem, int].connect(self.expandGroup) + self.itemDoubleClicked.connect( + self.expandGroup + ) # [QtWidgets.QTreeWidgetItem, int] @QtCore.pyqtSlot() def beginNotify(self): @@ -1588,7 +1590,7 @@ class PesterWindow(MovingWindow): chums = [PesterProfile(c, chumdb=self.chumdb) for c in set(self.config.chums())] self.chumList = chumArea(chums, self) - self.chumList.itemActivated[QtWidgets.QTreeWidgetItem, int].connect( + self.chumList.itemActivated.connect( # [QtWidgets.QTreeWidgetItem, int] self.pesterSelectedChum ) self.chumList.removeChumSignal[str].connect(self.removeChum) @@ -4350,7 +4352,7 @@ class MainProgram(QtCore.QObject): self.trayicon.setContextMenu(self.traymenu) self.trayicon.show() - self.trayicon.activated[QtWidgets.QSystemTrayIcon.ActivationReason].connect( + self.trayicon.activated.connect( # [QtWidgets.QSystemTrayIcon.ActivationReason] self.widget.systemTrayActivated ) self.widget.trayIconSignal[int].connect(self.trayicon.changeTrayIcon)