diff --git a/share/qtcreator/cplusplus/qt5-qobjectdefs-injected.h b/share/qtcreator/cplusplus/qt5-qobjectdefs-injected.h index 22f6f0ca2f0f42564d526655dec254d46acabadb..946ec33bd16bacee291e4e6498e859724c0e142f 100644 --- a/share/qtcreator/cplusplus/qt5-qobjectdefs-injected.h +++ b/share/qtcreator/cplusplus/qt5-qobjectdefs-injected.h @@ -30,16 +30,24 @@ #define QT_NO_META_MACROS -#define signals public __attribute__((annotate("qt_signal"))) -#define slots __attribute__((annotate("qt_slot"))) -#define Q_SIGNALS signals -#define Q_SLOTS slots +#if defined(QT_NO_KEYWORDS) +# define QT_NO_EMIT +#else +# 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_SLOT __attribute__((annotate("qt_slot"))) -# define Q_PRIVATE_SLOT(d, signature) +#define Q_PRIVATE_SLOT(d, signature) #define Q_EMIT -#define emit +#ifndef QT_NO_EMIT +# define emit +#endif #define Q_CLASSINFO(name, value) #define Q_PLUGIN_METADATA(x) #define Q_INTERFACES(x)