diff options
author | Anton Lundin <glance@acc.umu.se> | 2015-05-27 21:19:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-27 15:37:37 -0700 |
commit | 4124052b38f4c2e2f8bef40ebc74d6bbd35382af (patch) | |
tree | 9b3b8a512f072afaba66d13856a1b542165ede62 /configuredivecomputerthreads.cpp | |
parent | f7be6daacc91fd17291398d070825a49f6991ba1 (diff) | |
download | subsurface-4124052b38f4c2e2f8bef40ebc74d6bbd35382af.tar.gz |
Remove the lastError from DeviceThreads
There is no reason for the DeviceThreads to keep a copy of the last
error around, so this removes that code.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'configuredivecomputerthreads.cpp')
-rw-r--r-- | configuredivecomputerthreads.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp index 50cdc6838..72915eab3 100644 --- a/configuredivecomputerthreads.cpp +++ b/configuredivecomputerthreads.cpp @@ -1511,12 +1511,10 @@ void ReadSettingsThread::run() dc_device_close(m_data->device); if (!supported) { - lastError = tr("This feature is not yet available for the selected dive computer."); - emit error(lastError); + emit error(tr("This feature is not yet available for the selected dive computer.")); } } else { - lastError = tr("Could not a establish connection to the dive computer."); - emit error(lastError); + emit error(tr("Could not a establish connection to the dive computer.")); } } @@ -1573,12 +1571,10 @@ void WriteSettingsThread::run() dc_device_close(m_data->device); if (!supported) { - lastError = tr("This feature is not yet available for the selected dive computer."); - emit error(lastError); + emit error(tr("This feature is not yet available for the selected dive computer.")); } } else { - lastError = tr("Could not a establish connection to the dive computer."); - emit error(lastError); + emit error(tr("Could not a establish connection to the dive computer.")); } } @@ -1618,14 +1614,12 @@ void FirmwareUpdateThread::run() dc_device_close(m_data->device); if (!supported) { - lastError = tr("This feature is not yet available for the selected dive computer."); - emit error(lastError); + emit error(tr("This feature is not yet available for the selected dive computer.")); } else if (rc != DC_STATUS_SUCCESS) { - lastError = tr("Firmware update failed!"); + emit error(tr("Firmware update failed!")); } } else { - lastError = tr("Could not a establish connection to the dive computer."); - emit error(lastError); + emit error(tr("Could not a establish connection to the dive computer.")); } } @@ -1650,11 +1644,9 @@ void ResetSettingsThread::run() dc_device_close(m_data->device); if (!supported) { - lastError = tr("This feature is not yet available for the selected dive computer."); - emit error(lastError); + emit error(tr("This feature is not yet available for the selected dive computer.")); } } else { - lastError = tr("Could not a establish connection to the dive computer."); - emit error(lastError); + emit error(tr("Could not a establish connection to the dive computer.")); } } |