MCPcopy Create free account
hub / github.com/MITK/MITK / Cancel

Method Cancel

Modules/PythonInstaller/src/QmitkPipInstaller.cpp:187–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void 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
208bool QmitkPipInstaller::IsRunning() const
209{

Callers 1

ConfirmCancelMethod · 0.45

Calls 1

FinalizeCancelMethod · 0.95

Tested by

no test coverage detected