1. TortoiseHg
  2. TortoiseHg
  3. thg

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.

  • Participants
  • Parent commits f06d377
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/repomodel.py

View file
         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