[Qt-interest] [Interest] z-order for Qt's signals and slots
Bo Thorsen
bo at fioniasoftware.dk
Thu Nov 24 08:06:31 CET 2011
Den 23-11-2011 17:12, Giuseppe D'Angelo skrev:
> On 23 November 2011 15:23, Arnold Krille<arnold at arnoldarts.de> wrote:
>> No, they are _not_ guaranteed to be called in order. The docs explicitly state
>> that currently the order called is the order connected, but also states that
>> this can change anytime if a "better" algorithm is found.
>
> I must have overlooked this fact. Where it's written?
>
> What I said comes from http://doc.qt.nokia.com/latest/signalsandslots.html
> "If several slots are connected to one signal, the slots will be
> executed one after the other, in the order they have been connected,
> when the signal is emitted."
> and as I said, was added in 4.6 docs by commit 0ea19cf0 -- before it
> showed "undefined".
Interesting, I missed this one. Since I started with Qt (version 0.3x),
the documentation always said it was undefined.
But the documentation is the specification with Qt, so you can trust
this not to change. At least not until a new major release. And it has
actually always been this way, so I guess it makes sense to just define
it as guaranteed.
It's rare that I learn something new about basic Qt stuff, thanks :-)
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Qt-interest-old
mailing list