Minor: reformatting code.w

This commit is contained in:
Gerhard Hoffmann 2024-02-06 11:28:01 +01:00
parent 0dffc1d1c2
commit b0f1e0a493

View File

@ -146,34 +146,33 @@ Update::Update(Worker *worker,
QDebug critical = qCritical(); QDebug critical = qCritical();
critical << "connect() to onReportDCDownloadStatus() ..."; critical << "connect() to onReportDCDownloadStatus() ...";
if (!connect(obj, if (!connect(obj,
SIGNAL(hwapi_reportDCDownloadStatus(QString const&)), this, SIGNAL(hwapi_reportDCDownloadStatus(QString const&)),
SLOT(onReportDCDownloadStatus(QString const &)))) { this,
SLOT(onReportDCDownloadStatus(QString const &)))) {
critical << "FAILED"; critical << "FAILED";
} } else critical << "DONE";
critical << "DONE";
critical = qCritical(); critical = qCritical();
critical << "connect() to onReportDCDownloadSuccess() ..."; critical << "connect() to onReportDCDownloadSuccess() ...";
if (!connect(obj, if (!connect(obj,
SIGNAL(hwapi_reportDCDownloadSuccess(QString const&)), this, SIGNAL(hwapi_reportDCDownloadSuccess(QString const&)), this,
SLOT(onReportDCDownloadSuccess(QString const &)))) { SLOT(onReportDCDownloadSuccess(QString const &)))) {
critical << "FAILED"; critical << "FAILED";
} } else critical << "DONE";
critical << "DONE";
critical = qCritical(); critical = qCritical();
critical << "connect() to onReportDCDownloadFailure() ..."; critical << "connect() to onReportDCDownloadFailure() ...";
if (!connect(obj, if (!connect(obj,
SIGNAL(hwapi_reportDCDownloadFailure(QString const &)), this, SIGNAL(hwapi_reportDCDownloadFailure(QString const &)), this,
SLOT(onReportDCDownloadFailure(QString const &)))) { SLOT(onReportDCDownloadFailure(QString const &)))) {
critical << "FAILED"; critical << "FAILED";
} } else critical << "DONE";
critical << "DONE";
} }
} }
Update::~Update() { Update::~Update() {
} }
void Update::onReportDCDownloadStatus(QString const &status) { void Update::onReportDCDownloadStatus(QString const &status) {
emit m_worker->showStatusMessage("DL", status); emit m_worker->showStatusMessage("DL", status);
} }
@ -645,8 +644,8 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
m_worker->startProgressLoop(); m_worker->startProgressLoop();
QString const &fToWorkOn = QDir::cleanPath(m_customerRepository + QDir::separator() + it->trimmed()); QString const &fToWorkOn = QDir::cleanPath(m_customerRepository + QDir::separator() + it->trimmed());
if (fToWorkOn.endsWith("/dc2c.bin") && dcDownloadPossible) { if (fToWorkOn.endsWith("/dc2c.bin") && dcDownloadPossible) {
qCritical() << "F-TO-WORK-ON" << fToWorkOn;
// download for dc possible only once // download for dc possible only once
// download of device-controller should always be the last step
dcDownloadPossible = false; dcDownloadPossible = false;
if (!m_hw->dcDownloadRequest(fToWorkOn)) { // initiate download process 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) qCritical() << QDateTime::currentDateTime().toString(Qt::ISODate)
<< "(" << __func__ << ":" << __LINE__ << ") DOWNLOAD REPORT RUNNING"; << "(" << __func__ << ":" << __LINE__ << ") DOWNLOAD REPORT RUNNING";
while (m_hw->dcDownloadReportRunning()) { while (m_hw->dcDownloadReportRunning()) {
QThread::msleep(500); QThread::msleep(500);
} }
bool updateBinaryRes = true; bool updateBinaryRes = true;
// CONSOLE() // CONSOLE()