NOISSUE mark used accounts/sessions in selection menus

This commit is contained in:
Petr Mrázek
2016-11-15 02:51:22 +01:00
parent 3769897be1
commit 12f6534e77
13 changed files with 194 additions and 5 deletions

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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;