summaryrefslogtreecommitdiffstats
path: root/configuredivecomputerthreads.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-01-20 22:40:55 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-21 17:04:04 +1200
commitb0260c6025a0824ce0f1265615b2cb97251b93c1 (patch)
treea52f03178e2fff416ebc0261cca78c19c5fe753a /configuredivecomputerthreads.cpp
parent3f805dda1d22e6199e5071ec8f8f90b4ddcc612e (diff)
downloadsubsurface-b0260c6025a0824ce0f1265615b2cb97251b93c1.tar.gz
Emit 100% progress after quick actions
These actions are basically instant. The infrastructure are in place so if someone feels for building a proper progress, be my guest, but this just makes sure the progress bar acts like in the other cases to the user. 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.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index 5cb5cb516..f1434f660 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -1487,6 +1487,7 @@ void ReadSettingsThread::run()
emit devicedetails(m_deviceDetails);
else
emit error("Failed!");
+ emit progress(100);
break;
#endif // divecomputer 0.5.0
#ifdef DEBUG_OSTC
@@ -1499,6 +1500,7 @@ void ReadSettingsThread::run()
emit devicedetails(m_deviceDetails);
else
emit error("Failed!");
+ emit progress(100);
break;
default:
supported = false;
@@ -1551,6 +1553,7 @@ void WriteSettingsThread::run()
rc = write_ostc3_settings(m_data->device, m_deviceDetails);
if (rc != DC_STATUS_SUCCESS)
emit error(tr("Failed!"));
+ emit progress(100);
break;
#endif // divecomputer 0.5.0
#ifdef DEBUG_OSTC
@@ -1561,6 +1564,7 @@ void WriteSettingsThread::run()
rc = write_ostc_settings(m_data->device, m_deviceDetails);
if (rc != DC_STATUS_SUCCESS)
emit error(tr("Failed!"));
+ emit progress(100);
break;
default:
supported = false;
@@ -1640,6 +1644,7 @@ void ResetSettingsThread::run()
if (dc_device_get_type(m_data->device) == DC_FAMILY_HW_OSTC3) {
supported = true;
hw_ostc3_device_config_reset(m_data->device);
+ emit progress(100);
}
#endif // divecomputer 0.5.0
dc_device_close(m_data->device);