Plugins/VcsPlugins/vcsMercurial/HgDialog.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2302
f29e9405c851
child 2791
a9577f248f04
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog starting a process and showing its output. 7 Module implementing a dialog starting a process and showing its output.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
11 try:
12 str = unicode
13 except (NameError):
14 pass
9 15
10 import os 16 import os
11 17
12 from PyQt4.QtCore import QProcess, QTimer, pyqtSlot, Qt, QCoreApplication 18 from PyQt4.QtCore import QProcess, QTimer, pyqtSlot, Qt, QCoreApplication
13 from PyQt4.QtGui import QDialog, QDialogButtonBox, QLineEdit 19 from PyQt4.QtGui import QDialog, QDialogButtonBox, QLineEdit
33 39
34 @param text text to be shown by the label (string) 40 @param text text to be shown by the label (string)
35 @param hg reference to the Mercurial interface object (Hg) 41 @param hg reference to the Mercurial interface object (Hg)
36 @param parent parent widget (QWidget) 42 @param parent parent widget (QWidget)
37 """ 43 """
38 super().__init__(parent) 44 super(HgDialog, self).__init__(parent)
39 self.setupUi(self) 45 self.setupUi(self)
40 46
41 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) 47 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
42 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) 48 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
43 49
287 """ 293 """
288 if self.intercept: 294 if self.intercept:
289 self.intercept = False 295 self.intercept = False
290 evt.accept() 296 evt.accept()
291 return 297 return
292 super().keyPressEvent(evt) 298 super(HgDialog, self).keyPressEvent(evt)
293 299
294 def hasAddOrDelete(self): 300 def hasAddOrDelete(self):
295 """ 301 """
296 Public method to check, if the last action contained an add or delete. 302 Public method to check, if the last action contained an add or delete.
297 303

eric ide

mercurial