vermarajeev
16th October 2007, 09:09
Hello All,
//.h
class A
{
Q_OBJECT
public:
A(){}
public slots:
#ifdef SOMEMACRO
void slotA();
#endif
};
//.cpp
#ifdef SOMEMACRO
void A::slotA()
{
//..
}
#endif
If SOMEMACRO is "NOT DEFINED" will the above code compile?
In my case it doesn't compile. Why?
Is the moc_A.cpp file created before preprocessors being parsed by the compiler?
Thanks
//.h
class A
{
Q_OBJECT
public:
A(){}
public slots:
#ifdef SOMEMACRO
void slotA();
#endif
};
//.cpp
#ifdef SOMEMACRO
void A::slotA()
{
//..
}
#endif
If SOMEMACRO is "NOT DEFINED" will the above code compile?
In my case it doesn't compile. Why?
Is the moc_A.cpp file created before preprocessors being parsed by the compiler?
Thanks