Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.5.0
-
None
Description
The following code won't compile due to MOC can't find the Q_OBJECT macro:
#include <QObject> #define MY_MACRO1 Q_CLASSINFO("test1", "1") #define MY_MACRO2 Q_CLASSINFO("test2", "2") #define TEST_MACRO \ MY_MACRO1 \ MY_MACRO2 \ Q_OBJECT class Test : public QObject { TEST_MACRO public: explicit Test(QObject *parent = nullptr) : QObject(parent) {} ~Test() override {} };