|
|
On 23.10.08 22:51:09, Elvis Dowson wrote:
> Here is an excerpt from the reference doc for Qt 4.4.3: Signals and
> Slots
>
> If several slots are connected to one signal, the slots will be executed
> one after the other, in an arbitrary order, when the signal is emitted.
>
> If Qt is used for the development of a deterministic real-time, near-
> real-time or safety critical application, one must have precise control
> over execution order. One way to achieve this is to enhance the
> implementation so that if several slots are connected to one signal, the
> user should have the ability to specify the priority order for each slot,
> so that they are executed in a sequence, and according to the priority
> levels. This way, when you design a software component, you can test it
> also in a deterministic manner, since at run-time the execution sequence
> will be known before hand.
Well, even though the statement above talks about "arbitrary" order, the
actual implementation of signal/slots calls the slots in the order of the
connect-statements - at least for direct connection slots. So you could
emulate your idea of priorities by adding a custom connect function taking
a priority, which disconnects all slots with lower priority than the new
one, then connects the new one and re-connects the others.
Apart from that, if you want priorities for connect into Qt, you should
talk to Qt Software/Nokia via their bug/feature wish submission form on the
website.
Andreas
--
A few hours grace before the madness begins again.
--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/
|
|