115 Private slot called when the process finished. |
115 Private slot called when the process finished. |
116 |
116 |
117 It is called when the process finished or |
117 It is called when the process finished or |
118 the user pressed the button. |
118 the user pressed the button. |
119 """ |
119 """ |
120 if self.process is not None and \ |
120 if self.process is not None: |
121 self.process.state() != QProcess.NotRunning: |
121 if self.process.state() != QProcess.NotRunning: |
122 self.process.terminate() |
122 self.process.terminate() |
123 QTimer.singleShot(2000, self.process.kill) |
123 QTimer.singleShot(2000, self.process.kill) |
124 self.process.waitForFinished(3000) |
124 self.process.waitForFinished(3000) |
|
125 if self.process.exitStatus() == QProcess.CrashExit: |
|
126 self.contents.insertPlainText( |
|
127 self.tr('\n{0} crashed.\n').format(self.cmdname)) |
125 |
128 |
126 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
129 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
127 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
130 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
128 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
131 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
129 |
132 |