eric6/Plugins/VcsPlugins/vcsMercurial/HgConflictsListDialog.py

changeset 7257
c4d0cac9b5c9
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7256:4ef3b78ebb4e 7257:c4d0cac9b5c9
10 10
11 11
12 import os 12 import os
13 13
14 from PyQt5.QtCore import pyqtSlot, Qt, QPoint, QProcess, QTimer 14 from PyQt5.QtCore import pyqtSlot, Qt, QPoint, QProcess, QTimer
15 from PyQt5.QtWidgets import QAbstractButton, QDialogButtonBox, QHeaderView, \ 15 from PyQt5.QtWidgets import (
16 QTreeWidgetItem, QLineEdit, QApplication, QWidget 16 QAbstractButton, QDialogButtonBox, QHeaderView, QTreeWidgetItem, QLineEdit,
17 QApplication, QWidget
18 )
17 19
18 from E5Gui import E5MessageBox 20 from E5Gui import E5MessageBox
19 from E5Gui.E5Application import e5App 21 from E5Gui.E5Application import e5App
20 22
21 from .Ui_HgConflictsListDialog import Ui_HgConflictsListDialog 23 from .Ui_HgConflictsListDialog import Ui_HgConflictsListDialog
77 """ 79 """
78 if self.__hgClient: 80 if self.__hgClient:
79 if self.__hgClient.isExecuting(): 81 if self.__hgClient.isExecuting():
80 self.__hgClient.cancel() 82 self.__hgClient.cancel()
81 else: 83 else:
82 if self.process is not None and \ 84 if (
83 self.process.state() != QProcess.NotRunning: 85 self.process is not None and
86 self.process.state() != QProcess.NotRunning
87 ):
84 self.process.terminate() 88 self.process.terminate()
85 QTimer.singleShot(2000, self.process.kill) 89 QTimer.singleShot(2000, self.process.kill)
86 self.process.waitForFinished(3000) 90 self.process.waitForFinished(3000)
87 91
88 self.__position = self.pos() 92 self.__position = self.pos()
168 def __finish(self): 172 def __finish(self):
169 """ 173 """
170 Private slot called when the process finished or the user pressed 174 Private slot called when the process finished or the user pressed
171 the button. 175 the button.
172 """ 176 """
173 if self.process is not None and \ 177 if (
174 self.process.state() != QProcess.NotRunning: 178 self.process is not None and
179 self.process.state() != QProcess.NotRunning
180 ):
175 self.process.terminate() 181 self.process.terminate()
176 QTimer.singleShot(2000, self.process.kill) 182 QTimer.singleShot(2000, self.process.kill)
177 self.process.waitForFinished(3000) 183 self.process.waitForFinished(3000)
178 184
179 QApplication.restoreOverrideCursor() 185 QApplication.restoreOverrideCursor()

eric ide

mercurial