Plugins/VcsPlugins/vcsSubversion/SvnDialog.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 QTimer, QProcess, pyqtSlot, Qt, QProcessEnvironment 18 from PyQt4.QtCore import QTimer, QProcess, pyqtSlot, Qt, QProcessEnvironment
13 from PyQt4.QtGui import QLineEdit, QDialog, QDialogButtonBox 19 from PyQt4.QtGui import QLineEdit, QDialog, QDialogButtonBox
32 Constructor 38 Constructor
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 parent parent widget (QWidget) 41 @param parent parent widget (QWidget)
36 """ 42 """
37 super().__init__(parent) 43 super(SvnDialog, self).__init__(parent)
38 self.setupUi(self) 44 self.setupUi(self)
39 45
40 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) 46 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
41 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) 47 self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
42 48
245 """ 251 """
246 if self.intercept: 252 if self.intercept:
247 self.intercept = False 253 self.intercept = False
248 evt.accept() 254 evt.accept()
249 return 255 return
250 super().keyPressEvent(evt) 256 super(SvnDialog, self).keyPressEvent(evt)
251 257
252 def hasAddOrDelete(self): 258 def hasAddOrDelete(self):
253 """ 259 """
254 Public method to check, if the last action contained an add or delete. 260 Public method to check, if the last action contained an add or delete.
255 261

eric ide

mercurial