[PATCH 4/7] Connect the progress events to the progress bar
Anton Lundin
glance at acc.umu.se
Wed Jan 21 09:54:35 PST 2015
On 21 January, 2015 - Tomaz Canabrava wrote:
> 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.
>
Oh, cool.
I'm fixing.
//Anton
--
Anton Lundin +46702-161604
More information about the subsurface
mailing list