52 def __finish(self): |
52 def __finish(self): |
53 """ |
53 """ |
54 Private slot called when the process finished or the user pressed the |
54 Private slot called when the process finished or the user pressed the |
55 button. |
55 button. |
56 """ |
56 """ |
57 if self.process is not None and \ |
57 if ( |
58 self.process.state() != QProcess.NotRunning: |
58 self.process is not None and |
|
59 self.process.state() != QProcess.NotRunning |
|
60 ): |
59 self.process.terminate() |
61 self.process.terminate() |
60 QTimer.singleShot(2000, self.process.kill) |
62 QTimer.singleShot(2000, self.process.kill) |
61 self.process.waitForFinished(3000) |
63 self.process.waitForFinished(3000) |
62 |
64 |
63 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
65 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
73 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
75 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
74 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
76 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
75 self.buttonBox.button(QDialogButtonBox.Close).setFocus( |
77 self.buttonBox.button(QDialogButtonBox.Close).setFocus( |
76 Qt.OtherFocusReason) |
78 Qt.OtherFocusReason) |
77 |
79 |
78 if Preferences.getVCS("AutoClose") and \ |
80 if ( |
79 self.normal and \ |
81 Preferences.getVCS("AutoClose") and |
80 self.errors.toPlainText() == "": |
82 self.normal and |
|
83 self.errors.toPlainText() == "" |
|
84 ): |
81 self.accept() |
85 self.accept() |
82 |
86 |
83 def on_buttonBox_clicked(self, button): |
87 def on_buttonBox_clicked(self, button): |
84 """ |
88 """ |
85 Private slot called by a button of the button box clicked. |
89 Private slot called by a button of the button box clicked. |