Qt-jambi-interest Archive, May 2007
Problems with slots in beta2
Message 1 in thread
Hi list,
it took me a while to finally find the bug that wouldn't let me migrate
my code to beta2. Looks like you introduced some nice Annotations
marking slots which aren't allowed to be slots ;). Would be fine if the
thrown Exception also knew that, but it is simply a
QNoSuchSlotException. I first thought it's a 64bit problem, so i tried
to build jambi natively (which i never finished due to the Qt4.3 dep and
compilation failures), then I tried to run the whole thing on 32bit, but
still the same, then I subclassed QtJambiInternal to be able to use
lookupSlot (which apperently found the Slot \o/), then I wrote a nice
small example which also failed, and right before i wanted to ask the ml
about that i really digged deeper into the Qt Jambi code and found out
that it's a simple Annotation issue which noone told me :-\.
Over all I'm just wondering why things like resize() and move() aren't
allowed to be Slots? Can there be any problems if they are Slots or are
they threadsafe now and no need to call them slotted?
Best regards
Georg Schild
Message 2 in thread
On Wednesday 02 May 2007 18:00, Georg Schild wrote:
> Hi list,
>
> it took me a while to finally find the bug that wouldn't let me migrate
> my code to beta2. Looks like you introduced some nice Annotations
> marking slots which aren't allowed to be slots ;). Would be fine if the
> thrown Exception also knew that, but it is simply a
> QNoSuchSlotException.
That is a good idea, it will probably be part of the next release.
> I first thought it's a 64bit problem, so i tried
> to build jambi natively (which i never finished due to the Qt4.3 dep and
> compilation failures), then I tried to run the whole thing on 32bit, but
> still the same, then I subclassed QtJambiInternal to be able to use
> lookupSlot (which apperently found the Slot \o/), then I wrote a nice
> small example which also failed, and right before i wanted to ask the ml
> about that i really digged deeper into the Qt Jambi code and found out
> that it's a simple Annotation issue which noone told me :-\.
>
> Over all I'm just wondering why things like resize() and move() aren't
> allowed to be Slots? Can there be any problems if they are Slots or are
> they threadsafe now and no need to call them slotted?
Currently we are marking methods that are not slots in qt, with an annotation,
to prevent signals being connected to them. This is mainly done to keep the
number of slots down and to stick with the qt api. This will also be
reflected in Qt Designer and make it less crowded.
Thanks for letting us know about your findings, it helps us staying on the
right track. :-)
Best regards
Håvard F
>
>
> Best regards
>
> Georg Schild