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