Don't close the FW update log window if the update fails (#7896)
This commit is contained in:
@@ -275,11 +275,12 @@ void FlashFirmwareDialog::startFlash(const QString &filename)
|
|||||||
ProgressDialog progressDialog(this, tr("Write Firmware to Radio"), CompanionIcon("write_flash.png"));
|
ProgressDialog progressDialog(this, tr("Write Firmware to Radio"), CompanionIcon("write_flash.png"));
|
||||||
|
|
||||||
// check hardware compatibility if requested
|
// check hardware compatibility if requested
|
||||||
|
bool checkPassed = true;
|
||||||
if (g.checkHardwareCompatibility()) {
|
if (g.checkHardwareCompatibility()) {
|
||||||
QString tempFirmware = generateProcessUniqueTempFileName("flash-check.bin");
|
QString tempFirmware = generateProcessUniqueTempFileName("flash-check.bin");
|
||||||
if (!readFirmware(tempFirmware, progressDialog.progress())) {
|
if (!readFirmware(tempFirmware, progressDialog.progress())) {
|
||||||
QMessageBox::warning(this, tr("Firmware check failed"), tr("Could not check firmware from radio"));
|
QMessageBox::warning(this, tr("Firmware check failed"), tr("Could not check firmware from radio"));
|
||||||
return;
|
checkPassed = false;
|
||||||
}
|
}
|
||||||
FirmwareInterface previousFirmware(tempFirmware);
|
FirmwareInterface previousFirmware(tempFirmware);
|
||||||
qunlink(tempFirmware);
|
qunlink(tempFirmware);
|
||||||
@@ -291,10 +292,11 @@ void FlashFirmwareDialog::startFlash(const QString &filename)
|
|||||||
qDebug() << "startFlash: removing temporary file" << filename;
|
qDebug() << "startFlash: removing temporary file" << filename;
|
||||||
qunlink(filename);
|
qunlink(filename);
|
||||||
}
|
}
|
||||||
return;
|
checkPassed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (checkPassed) {
|
||||||
// backup if requested
|
// backup if requested
|
||||||
bool result = true;
|
bool result = true;
|
||||||
QString backupFilename;
|
QString backupFilename;
|
||||||
@@ -326,6 +328,8 @@ void FlashFirmwareDialog::startFlash(const QString &filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
progressDialog.progress()->setInfo(tr("Flashing done"));
|
progressDialog.progress()->setInfo(tr("Flashing done"));
|
||||||
|
}
|
||||||
|
|
||||||
progressDialog.exec();
|
progressDialog.exec();
|
||||||
|
|
||||||
if (isTempFileName(filename)) {
|
if (isTempFileName(filename)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user