eric6/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesHeaderDialog.py

changeset 7257
c4d0cac9b5c9
parent 7229
53054eb5b15a
child 7360
9190402e4505
equal deleted inserted replaced
7256:4ef3b78ebb4e 7257:c4d0cac9b5c9
60 """ 60 """
61 if self.__hgClient: 61 if self.__hgClient:
62 if self.__hgClient.isExecuting(): 62 if self.__hgClient.isExecuting():
63 self.__hgClient.cancel() 63 self.__hgClient.cancel()
64 else: 64 else:
65 if self.process is not None and \ 65 if (
66 self.process.state() != QProcess.NotRunning: 66 self.process is not None and
67 self.process.state() != QProcess.NotRunning
68 ):
67 self.process.terminate() 69 self.process.terminate()
68 QTimer.singleShot(2000, self.process.kill) 70 QTimer.singleShot(2000, self.process.kill)
69 self.process.waitForFinished(3000) 71 self.process.waitForFinished(3000)
70 72
71 e.accept() 73 e.accept()
115 def __finish(self): 117 def __finish(self):
116 """ 118 """
117 Private slot called when the process finished or the user pressed 119 Private slot called when the process finished or the user pressed
118 the button. 120 the button.
119 """ 121 """
120 if self.process is not None and \ 122 if (
121 self.process.state() != QProcess.NotRunning: 123 self.process is not None and
124 self.process.state() != QProcess.NotRunning
125 ):
122 self.process.terminate() 126 self.process.terminate()
123 QTimer.singleShot(2000, self.process.kill) 127 QTimer.singleShot(2000, self.process.kill)
124 self.process.waitForFinished(3000) 128 self.process.waitForFinished(3000)
125 129
126 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) 130 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)

eric ide

mercurial