From b0f1e0a4935e204f3350d1e37aa8d4832a9356b5 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 6 Feb 2024 11:28:01 +0100 Subject: [PATCH] Minor: reformatting code.w --- update.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/update.cpp b/update.cpp index 57e478d..7b29520 100644 --- a/update.cpp +++ b/update.cpp @@ -146,34 +146,33 @@ Update::Update(Worker *worker, QDebug critical = qCritical(); critical << "connect() to onReportDCDownloadStatus() ..."; if (!connect(obj, - SIGNAL(hwapi_reportDCDownloadStatus(QString const&)), this, - SLOT(onReportDCDownloadStatus(QString const &)))) { + SIGNAL(hwapi_reportDCDownloadStatus(QString const&)), + this, + SLOT(onReportDCDownloadStatus(QString const &)))) { critical << "FAILED"; - } - critical << "DONE"; + } else critical << "DONE"; + critical = qCritical(); critical << "connect() to onReportDCDownloadSuccess() ..."; if (!connect(obj, SIGNAL(hwapi_reportDCDownloadSuccess(QString const&)), this, SLOT(onReportDCDownloadSuccess(QString const &)))) { critical << "FAILED"; - } - critical << "DONE"; + } else critical << "DONE"; + critical = qCritical(); critical << "connect() to onReportDCDownloadFailure() ..."; if (!connect(obj, SIGNAL(hwapi_reportDCDownloadFailure(QString const &)), this, SLOT(onReportDCDownloadFailure(QString const &)))) { critical << "FAILED"; - } - critical << "DONE"; + } else critical << "DONE"; } } Update::~Update() { } - void Update::onReportDCDownloadStatus(QString const &status) { emit m_worker->showStatusMessage("DL", status); } @@ -645,8 +644,8 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) { m_worker->startProgressLoop(); QString const &fToWorkOn = QDir::cleanPath(m_customerRepository + QDir::separator() + it->trimmed()); if (fToWorkOn.endsWith("/dc2c.bin") && dcDownloadPossible) { - qCritical() << "F-TO-WORK-ON" << fToWorkOn; // download for dc possible only once + // download of device-controller should always be the last step dcDownloadPossible = false; if (!m_hw->dcDownloadRequest(fToWorkOn)) { // initiate download process @@ -684,11 +683,11 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) { qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate) << "(" << __func__ << ":" << __LINE__ << ") DOWNLOAD REPORT RUNNING"; + while (m_hw->dcDownloadReportRunning()) { QThread::msleep(500); } - bool updateBinaryRes = true; // CONSOLE()