eric6/E5Gui/E5ProcessDialog.py

changeset 7252
c5e3705073eb
parent 7229
53054eb5b15a
child 7354
d6aec4160f6b
equal deleted inserted replaced
7251:bc5b1b00560a 7252:c5e3705073eb
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_E5ProcessDialog import Ui_E5ProcessDialog 20 from .Ui_E5ProcessDialog import Ui_E5ProcessDialog
60 def __finish(self): 61 def __finish(self):
61 """ 62 """
62 Private slot called when the process finished or the user pressed 63 Private slot called when the process finished or the user pressed
63 the button. 64 the button.
64 """ 65 """
65 if self.__process is not None and \ 66 if (
66 self.__process.state() != QProcess.NotRunning: 67 self.__process is not None and
68 self.__process.state() != QProcess.NotRunning
69 ):
67 self.__process.terminate() 70 self.__process.terminate()
68 QTimer.singleShot(2000, self.__process.kill) 71 QTimer.singleShot(2000, self.__process.kill)
69 self.__process.waitForFinished(3000) 72 self.__process.waitForFinished(3000)
70 73
71 self.inputGroup.setEnabled(False) 74 self.inputGroup.setEnabled(False)

eric ide

mercurial