eric6/Plugins/VcsPlugins/vcsGit/GitBlameDialog.py

changeset 7257
c4d0cac9b5c9
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7256:4ef3b78ebb4e 7257:c4d0cac9b5c9
10 10
11 import os 11 import os
12 import re 12 import re
13 13
14 from PyQt5.QtCore import pyqtSlot, QProcess, QTimer, Qt, QCoreApplication 14 from PyQt5.QtCore import pyqtSlot, QProcess, QTimer, Qt, QCoreApplication
15 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QHeaderView, \ 15 from PyQt5.QtWidgets import (
16 QLineEdit, QTreeWidgetItem 16 QDialog, QDialogButtonBox, QHeaderView, QLineEdit, QTreeWidgetItem
17 )
17 18
18 from E5Gui import E5MessageBox 19 from E5Gui import E5MessageBox
19 20
20 from .Ui_GitBlameDialog import Ui_GitBlameDialog 21 from .Ui_GitBlameDialog import Ui_GitBlameDialog
21 22
65 """ 66 """
66 Protected slot implementing a close event handler. 67 Protected slot implementing a close event handler.
67 68
68 @param e close event (QCloseEvent) 69 @param e close event (QCloseEvent)
69 """ 70 """
70 if self.process is not None and \ 71 if (
71 self.process.state() != QProcess.NotRunning: 72 self.process is not None and
73 self.process.state() != QProcess.NotRunning
74 ):
72 self.process.terminate() 75 self.process.terminate()
73 QTimer.singleShot(2000, self.process.kill) 76 QTimer.singleShot(2000, self.process.kill)
74 self.process.waitForFinished(3000) 77 self.process.waitForFinished(3000)
75 78
76 e.accept() 79 e.accept()
124 def __finish(self): 127 def __finish(self):
125 """ 128 """
126 Private slot called when the process finished or the user pressed 129 Private slot called when the process finished or the user pressed
127 the button. 130 the button.
128 """ 131 """
129 if self.process is not None and \ 132 if (
130 self.process.state() != QProcess.NotRunning: 133 self.process is not None and
134 self.process.state() != QProcess.NotRunning
135 ):
131 self.process.terminate() 136 self.process.terminate()
132 QTimer.singleShot(2000, self.process.kill) 137 QTimer.singleShot(2000, self.process.kill)
133 self.process.waitForFinished(3000) 138 self.process.waitForFinished(3000)
134 139
135 self.inputGroup.setEnabled(False) 140 self.inputGroup.setEnabled(False)

eric ide

mercurial