MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / onStepFinished

Method onStepFinished

launcher/launch/LaunchTask.cpp:95–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95void 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
126void LaunchTask::finalizeSteps(bool successful, const QString& error)
127{

Callers

nothing calls this directly

Calls 5

QStringClass · 0.85
wasSuccessfulMethod · 0.80
failReasonMethod · 0.80
startMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected