Yuya Nishihara committed 79c3315

shelve: don't shadow built-in QDialog.finished (gc)

It disables deletion of modeless ShelveDialog, started from console widget.

It doesn't matter for modal dialog, because PyQt treats QDialog.exec_()
as a special case:

> int exec()
> [...]
> // Transfer ownership back to Python (a modal dialog will probably have the
> // main window as it's parent). This means the Qt dialog will be deleted when
> // the Python wrapper is garbage collected. Although this is a little
> // inconsistent, it saves having to code it explicitly to avoid the memory
> // leak.
> sipTransferBack(sipSelf);

(from sip/QtGui/qdialog.sip)

  • Participants
  • Parent commits 7a33b35

Comments (0)

Files changed (1)

File tortoisehg/hgqt/

 class ShelveDialog(QDialog):
-    finished = pyqtSignal(int)
     wdir = _('Working Directory')
     def __init__(self, repo, parent):