[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: MOC Generation and #preprocessor fields
From:       Nicolas Ternisien <nicolas.ternisien () gmail ! com>
Date:       2005-06-20 18:34:28
Message-ID: 200506202034.28855.nicolas.ternisien () gmail ! com
[Download RAW message or body]

OK, it does not work, and I'm really annoying !

The problem with this method is that Qt is agree to accept a slot "typedeffed" 
for the first parameter (KAction::ActivationReason). But at the starting of 
the application, it gives :

Incompatible sender/receiver arguments, because Qt is not able to see that 
ActivatedParam1 is typedeffed by KAction::ActivationReason.

Anybody has an idea ?

Thanks!

Le Lundi 20 Juin 2005 10:20, Michael Buesch a écrit :
> Quoting Nicolas Ternisien <nicolas.ternisien@gmail.
> > Yes, this is a good idea, but the problem is that the parameter
> > signature itselft is new in KDE 3.4.
> >
> > It's connected to this signal :
> >
> > activated (KAction::ActivationReason reason, Qt::ButtonState state)
> >
> > in KAction, and ActivationReason is new in KDE 3.4
> >
> > Thanks for your fast answer!
>
> You could try to use typedef (I think moc should support that,
> as QByteArray is a typedef in QT3 for example).
>
> #ifdef VER1
> typedef KAction::ActivationReason ActivatedParam1;
> typedef Qt::ButtonState ActivatedParam2;
> #else
> typedef int ActivatedParam1;
> typedef int ActivatedParam2;
> #endif
> ....
>
> slots:
> 	void activated(ActivatedParam1, ActivatedParam2);
>
> Ah, I like those messy hacks. 8-}
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic