Only create m_update-object if it is configured to update hardware (JSONs and DC).

This commit is contained in:
Gerhard Hoffmann 2024-05-03 13:32:39 +02:00
parent 63dc70dda9
commit 05c7d11ef8

View File

@ -170,6 +170,8 @@ Worker::Worker(int customerNr,
// TODO: turn object into singleton
instance = this;
m_lastFailedUpdateStep = UPDATE_STEP::NONE;
if (m_noUpdatePsaHardware == false) {
m_update = new Update(this,
QDir::cleanPath(m_workingDirectory + QDir::separator() + m_customerNrStr),
m_customerNrStr,
@ -177,6 +179,7 @@ Worker::Worker(int customerNr,
m_pluginDir,
m_pluginName,
m_workingDirectory);
}
this->setObjectName("worker-object");
QDir::setCurrent(m_workingDirectory);