mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Fix ConfigureDiveComputer class
This caused a crash when trying to call the firmware upgrade from the downloader - no idea how this worked for the other caller (from the main menu). Anyway, with this the "offer to upgrade the OSTC after a download from an OSTC that doesn't have the latest version" is indeed functional. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
123b104d09
commit
4559a26e31
3 changed files with 4 additions and 5 deletions
|
@ -9,8 +9,7 @@
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QXmlStreamWriter>
|
#include <QXmlStreamWriter>
|
||||||
|
|
||||||
ConfigureDiveComputer::ConfigureDiveComputer(QObject *parent) :
|
ConfigureDiveComputer::ConfigureDiveComputer() :
|
||||||
QObject(parent),
|
|
||||||
readThread(0),
|
readThread(0),
|
||||||
writeThread(0),
|
writeThread(0),
|
||||||
resetThread(0),
|
resetThread(0),
|
||||||
|
|
|
@ -14,7 +14,7 @@ class ConfigureDiveComputer : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit ConfigureDiveComputer(QObject *parent = 0);
|
explicit ConfigureDiveComputer();
|
||||||
void readSettings(device_data_t *data);
|
void readSettings(device_data_t *data);
|
||||||
|
|
||||||
enum states {
|
enum states {
|
||||||
|
|
|
@ -117,7 +117,7 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) :
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
|
|
||||||
deviceDetails = new DeviceDetails(this);
|
deviceDetails = new DeviceDetails(this);
|
||||||
config = new ConfigureDiveComputer(this);
|
config = new ConfigureDiveComputer();
|
||||||
connect(config, SIGNAL(error(QString)), this, SLOT(configError(QString)));
|
connect(config, SIGNAL(error(QString)), this, SLOT(configError(QString)));
|
||||||
connect(config, SIGNAL(message(QString)), this, SLOT(configMessage(QString)));
|
connect(config, SIGNAL(message(QString)), this, SLOT(configMessage(QString)));
|
||||||
connect(config, SIGNAL(deviceDetailsChanged(DeviceDetails*)),
|
connect(config, SIGNAL(deviceDetailsChanged(DeviceDetails*)),
|
||||||
|
@ -275,7 +275,7 @@ void OstcFirmwareCheck::saveOstcFirmware(QNetworkReply *reply)
|
||||||
file.open(QIODevice::WriteOnly);
|
file.open(QIODevice::WriteOnly);
|
||||||
file.write(firmwareData);
|
file.write(firmwareData);
|
||||||
file.close();
|
file.close();
|
||||||
ConfigureDiveComputer *config = new ConfigureDiveComputer(MainWindow::instance());
|
ConfigureDiveComputer *config = new ConfigureDiveComputer();
|
||||||
config->startFirmwareUpdate(storeFirmware, &devData);
|
config->startFirmwareUpdate(storeFirmware, &devData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue