summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 182bf76cb..2c2814dad 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -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);
}