Commits

Yuya Nishihara committed 5ede2ab

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

See 6c0ca3d2a132 why @pyqtSlot is disabled.

Comments (0)

Files changed (3)

tortoisehg/hgqt/mq.py

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

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()

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)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.