Commits

Yuya Nishihara committed 43fada9

repomodel: avoid filled.emit() of destroyed HgRepoListModel (fixes #1267)

If QTimer is connected to lambda, it will be alive even after QObject-part of
HgRepoListModel destroyed. As a result, it tries to emit unbound filled signal
causing TypeError, or "underlying C/C++ object has been deleted" error.

Comments (0)

Files changed (1)

tortoisehg/hgqt/repomodel.py

         self.layoutChanged.emit()
         self.ensureBuilt(row=0)
         self.showMessage.emit('')
-        QTimer.singleShot(0, lambda: self.filled.emit())
+        QTimer.singleShot(0, self.filled)
 
     def reloadConfig(self):
         _ui = self.repo.ui