[Qt-interest] need help with qobject connect

Ivan Lyapunov qt4box at gmail.com
Fri Aug 7 18:54:20 CEST 2009


It's not the only one purpuse to indicate something to signal emitter with
non-const reference.
I want to change my struct during the emission, since the emission queue is
serialized by Qt and it's not a multithread.
So i can change any parameter in struct in first SLOT to the end of
connectors in a connection order, like in a filter.
But unfortunately i should rewrite my code to void* calls because of strange
architect prohibition.

Regards,
 Ivan

2009/8/6 Thiago Macieira <thiago.macieira at trolltech.com>

> Ivan Lyapunov wrote:
> >QObject::connect: Cannot queue arguments of type 'aStruct&'
>
> You cannot queue or register non-const references.
>
> It doesn't make sense to send them in a queued signal emission anyway.
> Non-const references make sense for the slots to modify something in the
> parameter, indicating some value to the signal emitter.
>
> But in a queued connection, the slot may be run after the signal function
> returns. So the signal emitter function will not have any value returned.
>
> --
> Thiago Macieira - thiago.macieira (AT) nokia.com
>  Senior Product Manager - Nokia, Qt Software
>      Sandakerveien 116, NO-0402 Oslo, Norway
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090807/79f34c3f/attachment.html 


More information about the Qt-interest-old mailing list