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,13 +170,16 @@ Worker::Worker(int customerNr,
// TODO: turn object into singleton
instance = this;
m_lastFailedUpdateStep = UPDATE_STEP::NONE;
m_update = new Update(this,
QDir::cleanPath(m_workingDirectory + QDir::separator() + m_customerNrStr),
m_customerNrStr,
m_branchName,
m_pluginDir,
m_pluginName,
m_workingDirectory);
if (m_noUpdatePsaHardware == false) {
m_update = new Update(this,
QDir::cleanPath(m_workingDirectory + QDir::separator() + m_customerNrStr),
m_customerNrStr,
m_branchName,
m_pluginDir,
m_pluginName,
m_workingDirectory);
}
this->setObjectName("worker-object");
QDir::setCurrent(m_workingDirectory);