110 'Ensure, that it is in the search path.' |
111 'Ensure, that it is in the search path.' |
111 ).format('hg')) |
112 ).format('hg')) |
112 |
113 |
113 def __finish(self): |
114 def __finish(self): |
114 """ |
115 """ |
115 Private slot called when the process finished or the user pressed the button. |
116 Private slot called when the process finished or the user pressed |
|
117 the button. |
116 """ |
118 """ |
117 if self.process is not None and \ |
119 if self.process is not None and \ |
118 self.process.state() != QProcess.NotRunning: |
120 self.process.state() != QProcess.NotRunning: |
119 self.process.terminate() |
121 self.process.terminate() |
120 QTimer.singleShot(2000, self.process.kill) |
122 QTimer.singleShot(2000, self.process.kill) |
121 self.process.waitForFinished(3000) |
123 self.process.waitForFinished(3000) |
122 |
124 |
123 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
125 self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True) |
124 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
126 self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False) |
125 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
127 self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) |
126 self.buttonBox.button(QDialogButtonBox.Close).setFocus(Qt.OtherFocusReason) |
128 self.buttonBox.button(QDialogButtonBox.Close).setFocus( |
|
129 Qt.OtherFocusReason) |
127 |
130 |
128 self.process = None |
131 self.process = None |
129 |
132 |
130 def on_buttonBox_clicked(self, button): |
133 def on_buttonBox_clicked(self, button): |
131 """ |
134 """ |