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

List:       kde-devel
Subject:    Re: MOC Generation and #preprocessor fields
From:       Sascha Cunz <sascha.cunz () tiscali ! de>
Date:       2005-06-21 21:15:25
Message-ID: 200506212315.25868.sascha.cunz () tiscali ! de
[Download RAW message or body]

Hi,
> You might get somewhere with an approach based on the following ideas.  In
> the header file:
>
> #if !KDE_IS_VERSION(3,4,0)
> class KAction_dummy : public KAction {
>   enum ActivationReason;
> };
> #endif
> ...
>
> #if !KDE_IS_VERSION(3,4,0)
> #define KAction KAction_dummy
> #endif
> void slotLogActions(KAction::ActivationReason, Qt::ButtonState);
> #if !KDE_IS_VERSION(3,4,0)
> #undef KAction
> #endif
> void slotLogActions(void);

Have tried this approach just few days ago. This does not work with my moc. It 
completely ignores the #if.

Best solution seems to be two header files. And include only one of them (and 
one of the moc output you need.)

Cheers
Sascha
 
>> 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