NOISSUE mark used accounts/sessions in selection menus
This commit is contained in:
@ -42,6 +42,8 @@ signals:
|
||||
|
||||
public slots:
|
||||
virtual void proceed() {};
|
||||
// called in the opposite order than the Task launch(), used to clean up or otherwise undo things after the launch ends
|
||||
virtual void finalize() {};
|
||||
|
||||
protected: /* data */
|
||||
LaunchTask *m_parent;
|
||||
|
@ -88,7 +88,7 @@ void LaunchTask::onStepFinished()
|
||||
// end?
|
||||
if(currentStep == m_steps.size() - 1)
|
||||
{
|
||||
emitSucceeded();
|
||||
finalizeSteps(true, QString());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -99,7 +99,23 @@ void LaunchTask::onStepFinished()
|
||||
}
|
||||
else
|
||||
{
|
||||
emitFailed(step->failReason());
|
||||
finalizeSteps(false, step->failReason());
|
||||
}
|
||||
}
|
||||
|
||||
void LaunchTask::finalizeSteps(bool successful, const QString& error)
|
||||
{
|
||||
for(auto step = currentStep; step >= 0; step--)
|
||||
{
|
||||
m_steps[step]->finalize();
|
||||
}
|
||||
if(successful)
|
||||
{
|
||||
emitSucceeded();
|
||||
}
|
||||
else
|
||||
{
|
||||
emitFailed(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -109,6 +109,9 @@ public slots:
|
||||
void onStepFinished();
|
||||
void onProgressReportingRequested();
|
||||
|
||||
private: /*methods */
|
||||
void finalizeSteps(bool successful, const QString & error);
|
||||
|
||||
protected: /* data */
|
||||
InstancePtr m_instance;
|
||||
shared_qobject_ptr<LogModel> m_logModel;
|
||||
|
Reference in New Issue
Block a user