D pointers #2

Oswald Buddenhagen ossi at kde.org
Wed Oct 19 17:36:36 BST 2005


On Wed, Oct 19, 2005 at 02:06:22PM +0200, Lubos Lunak wrote:
> +       B::B()
> +       {
> +               disconnect( this, SIGNAL( bar( int* )), this, SLOT( barslot( int* )));
> +               connect( this, SIGNAL( bar( int* )), this, SLOT( barslot( int* )));
> +       }
> +
> Note [...] that in the constructor it is necessary to first disconnect
> and then connect again, that will disconnect A::barslot() and connect
> B::barslot() instead.
>
that's beyond me ...
doesn't A::A() already connect to B::barslot() because slots have
virtual behavior by nature?
or, the other way round, why should QObject::connect() do a different
thing when called with the same parameters from different places? am i
missing some deep magic?

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.




More information about the kde-core-devel mailing list