Hello All,
//.h
class A
{
Q_OBJECT
public:
A(){}
public slots:
#ifdef SOMEMACRO
void slotA();
#endif
};
//.cpp
#ifdef SOMEMACRO
void A::slotA()
{
//..
}
#endif
//.h
class A
{
Q_OBJECT
public:
A(){}
public slots:
#ifdef SOMEMACRO
void slotA();
#endif
};
//.cpp
#ifdef SOMEMACRO
void A::slotA()
{
//..
}
#endif
To copy to clipboard, switch view to plain text mode
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
Bookmarks