Commits

Yuya Nishihara committed 5ede2ab

qreorder: eliminate lambda slots so that it can be garbage-collected (refs #835)

See 6c0ca3d2a132 why @pyqtSlot is disabled.

  • Participants
  • Parent commits 82e13d2
  • Branches stable

Comments (0)

Files changed (3)

File tortoisehg/hgqt/mq.py

             return cont
         if checkGuardsOrComments():
             dlg = qreorder.QReorderDialog(self.repo, self)
-            dlg.finished.connect(dlg.deleteLater)
             dlg.exec_()
 
     @pyqtSlot()

File tortoisehg/hgqt/qreorder.py

         self.ulw = PatchListWidget(self)
         self.ulw.setDragDropMode(QListView.InternalMove)
         ugb.layout().addWidget(self.ulw)
-        self.ulw.currentItemChanged.connect(lambda:
-                self.showSummary(self.ulw.item(self.ulw.currentRow())))
+        self.ulw.currentItemChanged.connect(self.showSummary)
         self.ulw.menuRequested.connect(self.patchlistMenuRequest)
         layout.addWidget(ugb)
 
         agb.layout().setContentsMargins(*(0,)*4)
         self.alw = PatchListWidget(self)
         agb.layout().addWidget(self.alw)
-        self.alw.currentItemChanged.connect(lambda:
-                self.showSummary(self.alw.item(self.alw.currentRow())))
+        self.alw.currentItemChanged.connect(self.showSummary)
         self.alw.menuRequested.connect(self.patchlistMenuRequest)
         layout.addWidget(agb)
 
             alw.setCurrentRow(ar)
             self.alw.setFocus()
 
+    #@pyqtSlot(QListWidgetItem)
     def showSummary(self, item):
         if item is None:
             self.summ.clear()

File tortoisehg/hgqt/repowidget.py

                 return cont
             if checkGuardsOrComments():
                 dlg = qreorder.QReorderDialog(self.repo, self)
-                dlg.finished.connect(dlg.deleteLater)
                 dlg.exec_()
         def qfoldact():
             dlg = qfold.QFoldDialog(self.repo, self.menuselection, self)