Update-object now proper memeber of worker-thread.w

This commit is contained in:
2023-11-07 09:14:49 +01:00
parent 0050ea35d0
commit 1f8b88b2b6
2 changed files with 16 additions and 8 deletions

View File

@@ -94,11 +94,11 @@ bool Update::unloadDCPlugin() {
return false;
}
Update::Update(hwinf *hw,
Worker *worker,
Update::Update(Worker *worker,
QString customerRepository,
QString customerNrStr,
QString branchName,
QString plugInDir,
QString pluginName,
QString workingDir,
bool dryRun,
@@ -106,7 +106,7 @@ Update::Update(hwinf *hw,
char const *serialInterface,
char const *baudrate)
: QObject(parent)
, m_hw(hw)
, m_hw(loadDCPlugin(QDir(plugInDir), pluginName))
, m_worker(worker)
, m_serialInterface(serialInterface)
, m_baudrate(baudrate)
@@ -742,7 +742,12 @@ QStringList Update::getDcSoftAndHardWareVersion() {
}
bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
// always assume that serial line is open
if (!m_hw->sys_areDCdataValid()) { // must deliver 'true', only then are all
// data from hwapi valid
qCritical() << "ERROR!!! DC DATA NOT VALID";
return false;
}
bool res = false;
QList<QString>::const_iterator it;
for (it = filesToWorkOn.cbegin(); it != filesToWorkOn.cend(); ++it) {