[PATCH 4/7] Connect the progress events to the progress bar
Tomaz Canabrava
tcanabrava at kde.org
Wed Jan 21 09:19:16 PST 2015
On Tue, Jan 20, 2015 at 7:40 PM, Anton Lundin <glance at acc.umu.se> wrote:
> Signed-off-by: Anton Lundin <glance at acc.umu.se>
> ---
> configuredivecomputer.cpp | 10 ++++++++++
> configuredivecomputer.h | 2 ++
> qt-ui/configuredivecomputerdialog.cpp | 4 ++++
> 3 files changed, 16 insertions(+)
>
> diff --git a/configuredivecomputer.cpp b/configuredivecomputer.cpp
> index 4f7e873..ec69c77 100644
> --- a/configuredivecomputer.cpp
> +++ b/configuredivecomputer.cpp
> @@ -30,6 +30,7 @@ void ConfigureDiveComputer::readSettings(device_data_t
> *data)
> connect(readThread, SIGNAL(error(QString)), this,
> SLOT(setError(QString)));
> connect(readThread, SIGNAL(devicedetails(DeviceDetails *)), this,
> SIGNAL(deviceDetailsChanged(DeviceDetails *)));
> + connect(readThread, SIGNAL(progress(int)), this,
> SLOT(progressEvent(int)));
>
Anton,
When you connect a signal that's emmited in another thread you should use
the format
connect( sender, SIGNAL( signal()), receiver, SLOT( callback() ),
Qt::QueuedConnection );
to make signaling thread safe.
T
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150121/7ab43bed/attachment.html>
More information about the subsurface
mailing list