Moved final processing into destructor of subclsee UpdateProcessRunning.

This commit is contained in:
Gerhard Hoffmann 2024-01-19 13:06:58 +01:00
parent ec0e687c21
commit 1c9bb11f0b

View File

@ -204,6 +204,31 @@ class Worker : public QThread{
} }
virtual ~UpdateProcessRunning() { virtual ~UpdateProcessRunning() {
if (m_worker->m_lastFailedUpdateStep == UPDATE_STEP::NONE) {
if (m_worker->m_updateNotNecessary) {
// m_ismasTriggerStatusMessage = QStringList(QString("NO UPDATE NECESSARY (%1)").arg(current.toString(Qt::ISODate)));
QStringList lst = m_worker->m_ismasTriggerStatusMessage;
m_worker->GUI(lst) << (m_worker->CONSOLE(lst) << (m_worker->ISMAS(lst) << UPDATE_STEP::UPDATE_NOT_NECESSARY));
} else {
m_worker->ISMAS() << (m_worker->GUI() << (m_worker->CONSOLE() << UPDATE_STEP::UPDATE_SUCCEEDED));
m_worker->setProgress(_UPDATE_SUCCEEDED);
m_worker->ISMAS() << (m_worker->GUI() << (m_worker->CONSOLE() << UPDATE_STEP::UPDATE_ACTIVATED));
m_worker->setProgress(_UPDATE_ACTIVATED);
m_worker->ISMAS() << (m_worker->GUI() << (m_worker->CONSOLE() << UPDATE_STEP::FINISHED));
m_worker->setProgress(_FINISHED);
}
} else {
QStringList lst = m_worker->m_ismasTriggerStatusMessage;
UPDATE_STEP last = m_worker->m_lastFailedUpdateStep;
if (m_worker->smap.contains(last)) {
lst << QString(" (last failed: %1)").arg(m_worker->smap[last]);
}
m_worker->GUI(lst) << (m_worker->CONSOLE(lst) << (m_worker->ISMAS(lst) << UPDATE_STEP::UPDATE_FAILED));
}
m_worker->ISMAS() << (m_worker->GUI() << (m_worker->CONSOLE() m_worker->ISMAS() << (m_worker->GUI() << (m_worker->CONSOLE()
<< UPDATE_STEP::SEND_LAST_VERSION)); << UPDATE_STEP::SEND_LAST_VERSION));
m_worker->stopProgressLoop(); m_worker->stopProgressLoop();