| 93 | } |
| 94 | |
| 95 | void LaunchTask::onStepFinished() |
| 96 | { |
| 97 | // initial -> just start the first step |
| 98 | if(currentStep == -1) |
| 99 | { |
| 100 | currentStep ++; |
| 101 | m_steps[currentStep]->start(); |
| 102 | return; |
| 103 | } |
| 104 | |
| 105 | auto step = m_steps[currentStep]; |
| 106 | if(step->wasSuccessful()) |
| 107 | { |
| 108 | // end? |
| 109 | if(currentStep == m_steps.size() - 1) |
| 110 | { |
| 111 | finalizeSteps(true, QString()); |
| 112 | } |
| 113 | else |
| 114 | { |
| 115 | currentStep ++; |
| 116 | step = m_steps[currentStep]; |
| 117 | step->start(); |
| 118 | } |
| 119 | } |
| 120 | else |
| 121 | { |
| 122 | finalizeSteps(false, step->failReason()); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | void LaunchTask::finalizeSteps(bool successful, const QString& error) |
| 127 | { |
nothing calls this directly
no test coverage detected