diff options
Diffstat (limited to 'sources/pyside2/PySide2/global.h.in')
-rw-r--r-- | sources/pyside2/PySide2/global.h.in | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sources/pyside2/PySide2/global.h.in b/sources/pyside2/PySide2/global.h.in index a8065a7ba..a23b0f332 100644 --- a/sources/pyside2/PySide2/global.h.in +++ b/sources/pyside2/PySide2/global.h.in @@ -37,6 +37,16 @@ ** ****************************************************************************/ +// Make "signals:", "slots:" visible as access specifiers +#define QT_ANNOTATE_ACCESS_SPECIFIER(a) __attribute__((annotate(#a))) + +// Q_PROPERTY is defined as class annotation which does not work since a +// sequence of properties will to expand to a sequence of annotations +// annotating nothing, causing clang to complain. Instead, define it away in a +// static assert with the stringified argument in a ','-operator (cf qdoc). + +#define QT_ANNOTATE_CLASS(type,...) static_assert(sizeof(#__VA_ARGS__),#type); + #include <QtCore/qnamespace.h> #if @ENABLE_X11@ @@ -51,7 +61,4 @@ // not in release #define QT_NO_DEBUG -// Make "signals:", "slots:" visible as access specifiers -#define QT_ANNOTATE_ACCESS_SPECIFIER(a) __attribute__((annotate(#a))) - // Here are now all configured modules appended: |