| 185 | } |
| 186 | |
| 187 | void QmitkPipInstaller::Cancel() |
| 188 | { |
| 189 | if (m_State == State::Idle || m_State == State::Done || |
| 190 | m_State == State::Failed || m_State == State::Cancelling) |
| 191 | return; |
| 192 | |
| 193 | m_State = State::Cancelling; |
| 194 | |
| 195 | if (m_Process->state() != QProcess::NotRunning) |
| 196 | { |
| 197 | // Async path: kill the process and let OnProcessFinished call FinalizeCancel. |
| 198 | m_Process->kill(); |
| 199 | } |
| 200 | else |
| 201 | { |
| 202 | // No process running (we were in a synchronous transition between phases). |
| 203 | // Finalize immediately. |
| 204 | this->FinalizeCancel(); |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | bool QmitkPipInstaller::IsRunning() const |
| 209 | { |
no test coverage detected