From b0260c6025a0824ce0f1265615b2cb97251b93c1 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Tue, 20 Jan 2015 22:40:55 +0100 Subject: 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 Signed-off-by: Dirk Hohndel --- configuredivecomputerthreads.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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); -- cgit v1.2.3-70-g09d2