Clang: Respect QT_NO_*KEYWORDS in qt5-qobjectdefs-injected.h

Change-Id: I299db813c13f273a40e447c5fdde8ff8757480ba
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
This commit is contained in:
Nikolai Kosjar
2015-06-24 09:43:09 +02:00
parent 5d51bd9324
commit b7c025a5dd

View File

@@ -30,16 +30,24 @@
#define QT_NO_META_MACROS #define QT_NO_META_MACROS
#define signals public __attribute__((annotate("qt_signal"))) #if defined(QT_NO_KEYWORDS)
#define slots __attribute__((annotate("qt_slot"))) # define QT_NO_EMIT
#define Q_SIGNALS signals #else
#define Q_SLOTS slots # ifndef QT_NO_SIGNALS_SLOTS_KEYWORDS
# define signals public __attribute__((annotate("qt_signal")))
# define slots __attribute__((annotate("qt_slot")))
# endif
#endif
#define Q_SIGNALS public __attribute__((annotate("qt_signal")))
#define Q_SLOTS slots __attribute__((annotate("qt_slot")))
#define Q_SIGNAL __attribute__((annotate("qt_signal"))) #define Q_SIGNAL __attribute__((annotate("qt_signal")))
#define Q_SLOT __attribute__((annotate("qt_slot"))) #define Q_SLOT __attribute__((annotate("qt_slot")))
# define Q_PRIVATE_SLOT(d, signature) #define Q_PRIVATE_SLOT(d, signature)
#define Q_EMIT #define Q_EMIT
#define emit #ifndef QT_NO_EMIT
# define emit
#endif
#define Q_CLASSINFO(name, value) #define Q_CLASSINFO(name, value)
#define Q_PLUGIN_METADATA(x) #define Q_PLUGIN_METADATA(x)
#define Q_INTERFACES(x) #define Q_INTERFACES(x)