|
|
@ -46,7 +46,12 @@ public:
|
|
|
|
for( auto job : m_jobs )
|
|
|
|
for( auto job : m_jobs )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
emitProgress( current, total, job->prettyName() );
|
|
|
|
emitProgress( current, total, job->prettyName() );
|
|
|
|
job->exec();
|
|
|
|
JobResult result = job->exec();
|
|
|
|
|
|
|
|
if ( !result )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
emitFailed( result.message(), result.details() );
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
++current;
|
|
|
|
++current;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
emitProgress( total, total, QString() );
|
|
|
|
emitProgress( total, total, QString() );
|
|
|
@ -64,6 +69,14 @@ private:
|
|
|
|
Q_ARG( QString, prettyName )
|
|
|
|
Q_ARG( QString, prettyName )
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void emitFailed( const QString& message, const QString& details )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
QMetaObject::invokeMethod( m_queue, "failed", Qt::QueuedConnection,
|
|
|
|
|
|
|
|
Q_ARG( QString, message ),
|
|
|
|
|
|
|
|
Q_ARG( QString, details )
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|