[PATCH] Add a QProgressDialog to auto-ostc3-firmware
Dirk Hohndel
dirk at hohndel.org
Tue Jan 20 21:05:42 PST 2015
So in my state of limited mental capacity due to too much N₂ I've taken
this series. I bet I'm going to hate myself for this in the near future.
Tomaz, can you look through these, please?
/D
On Tue, Jan 20, 2015 at 10:49:56PM +0100, Anton Lundin wrote:
> Signed-off-by: Anton Lundin <glance at acc.umu.se>
> ---
> qt-ui/configuredivecomputerdialog.cpp | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
> index 182bf76..2c2814d 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);
> }
>
> --
> 2.1.0
>
> _______________________________________________
> subsurface mailing list
> subsurface at subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
More information about the subsurface
mailing list