On 7 July 2018 at 22:36, Robert Helling <[email protected]> wrote:
> Thiago,
>
> On 7. Jul 2018, at 18:54, Thiago Macieira <[email protected]> wrote:
>
> Usually, that function is used with Qt::QueuedConnection, which instead of
> calling the method indicated right now, it posts an event to the event queue
> with the arguments you supply. When the event loop gets to that event, the
> method you listed gets finally called.
>
> Another way of doing the same is by using QTimer::singleShot() with a lambda
> that carries your parameters. But this wasn't available before Qt 5.4, so
> there's a lot of code (and muscle memory) using invokeMethod().
>
>
> but this doesn’t seem the application in the subsurface code. If you do
>
> git grep invokeMethod
>
> you will find the instances.
>

the image related calls that don't have a connection type and are
technically using Qt::AutoConnection, which detects separate threads.
invokeMethod() can be also used to call functions in QML objects.

lubomir
--
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to