doUpdate(): add another level in if-case when downloading json-files.

This commit is contained in:
Gerhard Hoffmann 2023-12-15 09:38:01 +01:00
parent 12f48ad1bb
commit 0b4eed9dc0

View File

@ -555,8 +555,6 @@ bool Update::checkDownloadedJsonVersions(QStringList const& jsonFileNames) {
} }
} }
qCritical() << __PRETTY_FUNCTION__ << fInfo.fileName() << "jsonNr" << jsonNr;
if (jsonNr != 0) { if (jsonNr != 0) {
m_hw->sys_requestJsonVersions(jsonNr); m_hw->sys_requestJsonVersions(jsonNr);
@ -594,7 +592,9 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
QList<QString>::const_iterator it; QList<QString>::const_iterator it;
for (it = filesToWorkOn.cbegin(); it != filesToWorkOn.cend(); ++it) { for (it = filesToWorkOn.cbegin(); it != filesToWorkOn.cend(); ++it) {
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.contains("dc2c.bin")) { if (fToWorkOn.contains("dc2c.bin")) {
bool updateBinaryRes = true; bool updateBinaryRes = true;
@ -631,7 +631,8 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
res = updateBinaryRes; res = updateBinaryRes;
} else if (fToWorkOn.contains("DC2C_print", Qt::CaseInsensitive) } else {
if (fToWorkOn.contains("DC2C_print", Qt::CaseInsensitive)
&& fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) { && fToWorkOn.endsWith(".json", Qt::CaseInsensitive)) {
res = true; res = true;
int i = fToWorkOn.indexOf("DC2C_print", Qt::CaseInsensitive); int i = fToWorkOn.indexOf("DC2C_print", Qt::CaseInsensitive);
@ -685,6 +686,7 @@ bool Update::doUpdate(int &displayIndex, QStringList const &filesToWorkOn) {
qCritical() << "UNKNOWN JSON FILE NAME" << fToWorkOn; qCritical() << "UNKNOWN JSON FILE NAME" << fToWorkOn;
res = false; res = false;
} }
}
if (res == false) { if (res == false) {
break; break;