Commits

Steve Borho committed 1596ebc

pbranch: declare thgrepo signal handlers as slots, to avoid manual disconnect

Comments (0)

Files changed (1)

tortoisehg/hgqt/pbranch.py

             self.patchDiffMessage.setText(_('No patch branch selected'))
             self.patchDiffStack.setCurrentWidget(self.patchDiffMessage)
 
-    def closeEvent(self, event):
-        self.repo.configChanged.disconnect(self.configChanged)
-        self.repo.repositoryChanged.disconnect(self.repositoryChanged)
-        self.repo.workingBranchChanged.disconnect(self.workingBranchChanged)
-        super(PatchBranchWidget, self).closeEvent(event)
-
     def contextMenuEvent(self, event):
         if self.patchlist.geometry().contains(event.pos()):
             self.show_patch_cmenu(event.globalPos())
         self.repo.decrementBusyCount()
         self.refresh()
 
+    @pyqtSlot()
     def configChanged(self):
         pass
 
+    @pyqtSlot()
     def repositoryChanged(self):
         self.refresh()
 
+    @pyqtSlot()
     def workingBranchChanged(self):
         self.refresh()