52 |
52 |
53 self.outputGroup.setTitle(text) |
53 self.outputGroup.setTitle(text) |
54 |
54 |
55 def __finish(self): |
55 def __finish(self): |
56 """ |
56 """ |
57 Private slot called when the process finished or the user pressed the button. |
57 Private slot called when the process finished or the user pressed the |
|
58 button. |
58 """ |
59 """ |
59 if self.proc is not None and \ |
60 if self.proc is not None and \ |
60 self.proc.state() != QProcess.NotRunning: |
61 self.proc.state() != QProcess.NotRunning: |
61 self.proc.terminate() |
62 self.proc.terminate() |
62 QTimer.singleShot(2000, self.proc.kill) |
63 QTimer.singleShot(2000, self.proc.kill) |
72 self.proc = None |
73 self.proc = None |
73 |
74 |
74 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
75 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
75 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
76 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
76 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
77 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
77 self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason) |
78 self.buttonBox.button(QDialogButtonBox.Close).setFocus( |
|
79 Qt.OtherFocusReason) |
78 |
80 |
79 if Preferences.getVCS("AutoClose") and \ |
81 if Preferences.getVCS("AutoClose") and \ |
80 self.normal and \ |
82 self.normal and \ |
81 self.errors.toPlainText() == "": |
83 self.errors.toPlainText() == "": |
82 self.accept() |
84 self.accept() |