Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.1, 2.0.2, and 2.0.3

stable manifestdialog: delete old models explicitly (fixes #228)

Because ManifestWidget can be long-lived object, it should delete old
treemodel and selectionModel, which parent is QTreeView.
Note that da363858a5e5 set the parent of treemodel to ManifestWidget
in order to suppress QTimer warning.

Changeset 3c92ef0776dc

Parent 0ed65d3dab46

by Yuya Nishihara

Changes to one file · Browse files at 3c92ef0776dc Showing diff from parent 0ed65d3dab46 Diff from another changeset...

 
317
318
319
 
 
320
 
 
 
 
321
322
323
 
317
318
319
320
321
322
323
324
325
326
327
328
329
@@ -317,7 +317,13 @@
  self._treemodel = ManifestModel(self._repo, self._rev,   statusfilter=self._statusfilter.status(),   parent=self) + oldmodel = self._treeview.model() + oldselmodel = self._treeview.selectionModel()   self._treeview.setModel(self._treemodel) + if oldmodel: + oldmodel.deleteLater() + if oldselmodel: + oldselmodel.deleteLater()     selmodel = self._treeview.selectionModel()   selmodel.currentChanged.connect(self._updatecontent)