mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Add a QProgressDialog to auto-ostc3-firmware
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b0260c6025
commit
e8b02d3b2a
1 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
#include <QMessageBox>
|
||||
#include <QSettings>
|
||||
#include <QNetworkReply>
|
||||
#include <QProgressDialog>
|
||||
|
||||
struct product {
|
||||
const char *product;
|
||||
|
@ -281,7 +282,13 @@ void OstcFirmwareCheck::saveOstcFirmware(QNetworkReply *reply)
|
|||
file.open(QIODevice::WriteOnly);
|
||||
file.write(firmwareData);
|
||||
file.close();
|
||||
QProgressDialog *dialog = new QProgressDialog("Updating firmware", "", 0, 100);
|
||||
dialog->setCancelButton(0);
|
||||
dialog->setAutoClose(true);
|
||||
ConfigureDiveComputer *config = new ConfigureDiveComputer();
|
||||
connect(config, SIGNAL(message(QString)), dialog, SLOT(setLabelText(QString)));
|
||||
connect(config, SIGNAL(error(QString)), dialog, SLOT(setLabelText(QString)));
|
||||
connect(config, SIGNAL(progress(int)), dialog, SLOT(setValue(int)));
|
||||
config->startFirmwareUpdate(storeFirmware, &devData);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue