#ifdef and moc

mh crapsite at gmx.net
Sun Jun 2 08:05:54 UTC 2002


Hi,
I'm trying to bring one of my apps a little more in compliance with KDE, i.e.
the user can pass --enable-kde-app to configure and then QApplication
is replaced with KApplication to get at least the same style like other KDE 
applications. Unfortunately, I can't use QMainWindow, because the menubar 
isn't updated correctly.

Now the problem:
When I try something like this

#ifdef KDEAPP
class Bla : public KMainWindow
#elif
class Bla : public QMainWindow
#endif
{
  Q_OBJECT
...

then the moc is simply to stupid to parse this correctly. How do I achieve 
the same without getting syntax errors from the moc ?
Is it somehow possible, to exclude a single *.moc.o file from being linked? 
Then I could simply use two header files and #include the *.moc.cpp 
directly...
I'm using KDE2.2.1/Qt2.3.1.

Thanks for any help,
Michael


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list