[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: MOC Generation and #preprocessor fields
From: Nicolas Ternisien <nicolas.ternisien () gmail ! com>
Date: 2005-06-20 7:26:27
Message-ID: ccba71b50506200026b5ba9b8 () mail ! gmail ! com
[Download RAW message or body]
Hello everybody!!!
Due to compatibility issue, I have to add this kind of code to my header file :
public slots:
#if KDE_VERSION ...
#...
#define PARAMETER_LOG_ACTION Qt::ReleavantAction, Qt::ButtonState
(something like that)
#else
#define PARAMETER_LOG_ACTION void
void slotLogActions(PARAMETER_LOG_ACTION);
Of course, it's a slot to connect with KAction::activated() signal,
which in KDE 3.4 has 2 declaration : a method without parameter, and
another one with 2 parameters (defined by PARAMETER_LOG_ACTION
constants
My problem is that when the MOC file is compiled, it of course does
not see preprocessing commands, and add a strange slot
slotLogActions(PARAMETER_LOG_ACTION);
So my question is : How to avoid this problem ?
Is there any way to hide a slot, and manually add them, depending of
the KDE version, or something like that ?
My only issue is to create 2 static (!= dynamic, not recompiled each
time my header changed) moc files, and include them depending of the
version, but this is absolutely not practical, as I must recompiled
them when my header file change.
Thank you !!!
Nicolas Ternisien
>> 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