eric6/Plugins/VcsPlugins/vcsGit/GitDialog.py

changeset 7257
c4d0cac9b5c9
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7256:4ef3b78ebb4e 7257:c4d0cac9b5c9
8 """ 8 """
9 9
10 10
11 import os 11 import os
12 12
13 from PyQt5.QtCore import QProcess, QTimer, pyqtSlot, Qt, QCoreApplication, \ 13 from PyQt5.QtCore import (
14 QProcessEnvironment 14 QProcess, QTimer, pyqtSlot, Qt, QCoreApplication, QProcessEnvironment
15 )
15 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QLineEdit 16 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QLineEdit
16 17
17 from E5Gui import E5MessageBox 18 from E5Gui import E5MessageBox
18 19
19 from .Ui_GitDialog import Ui_GitDialog 20 from .Ui_GitDialog import Ui_GitDialog
57 def __finish(self): 58 def __finish(self):
58 """ 59 """
59 Private slot called when the process finished or the user pressed 60 Private slot called when the process finished or the user pressed
60 the button. 61 the button.
61 """ 62 """
62 if self.process is not None and \ 63 if (
63 self.process.state() != QProcess.NotRunning: 64 self.process is not None and
65 self.process.state() != QProcess.NotRunning
66 ):
64 self.process.terminate() 67 self.process.terminate()
65 QTimer.singleShot(2000, self.process.kill) 68 QTimer.singleShot(2000, self.process.kill)
66 self.process.waitForFinished(3000) 69 self.process.waitForFinished(3000)
67 70
68 self.inputGroup.setEnabled(False) 71 self.inputGroup.setEnabled(False)
77 Qt.OtherFocusReason) 80 Qt.OtherFocusReason)
78 81
79 if self.normal and self.errors.toPlainText(): 82 if self.normal and self.errors.toPlainText():
80 self.errorGroup.setTitle(self.tr("Additional Output")) 83 self.errorGroup.setTitle(self.tr("Additional Output"))
81 84
82 if Preferences.getVCS("AutoClose") and \ 85 if (
83 self.normal and \ 86 Preferences.getVCS("AutoClose") and
84 self.errors.toPlainText() == "": 87 self.normal and
88 self.errors.toPlainText() == ""
89 ):
85 self.accept() 90 self.accept()
86 91
87 def on_buttonBox_clicked(self, button): 92 def on_buttonBox_clicked(self, button):
88 """ 93 """
89 Private slot called by a button of the button box clicked. 94 Private slot called by a button of the button box clicked.

eric ide

mercurial