Warning, file /include/QtCore/qtmetamacros.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005 #ifndef QTMETAMACROS_H
0006 #define QTMETAMACROS_H
0007
0008 #include <QtCore/qglobal.h>
0009
0010 QT_BEGIN_NAMESPACE
0011
0012 #ifndef Q_MOC_OUTPUT_REVISION
0013 #define Q_MOC_OUTPUT_REVISION 68
0014 #endif
0015
0016
0017
0018 #ifndef QT_ANNOTATE_CLASS
0019 # define QT_ANNOTATE_CLASS(type, ...)
0020 #endif
0021 #ifndef QT_ANNOTATE_CLASS2
0022 # define QT_ANNOTATE_CLASS2(type, a1, a2)
0023 #endif
0024 #ifndef QT_ANNOTATE_FUNCTION
0025 # define QT_ANNOTATE_FUNCTION(x)
0026 #endif
0027 #ifndef QT_ANNOTATE_ACCESS_SPECIFIER
0028 # define QT_ANNOTATE_ACCESS_SPECIFIER(x)
0029 #endif
0030
0031
0032
0033
0034 #ifndef Q_MOC_RUN
0035 #ifndef QT_NO_META_MACROS
0036 # if defined(QT_NO_KEYWORDS)
0037 # define QT_NO_EMIT
0038 # else
0039 # ifndef QT_NO_SIGNALS_SLOTS_KEYWORDS
0040 # define slots Q_SLOTS
0041 # define signals Q_SIGNALS
0042 # endif
0043 # endif
0044 # define Q_SLOTS QT_ANNOTATE_ACCESS_SPECIFIER(qt_slot)
0045 # define Q_SIGNALS public QT_ANNOTATE_ACCESS_SPECIFIER(qt_signal)
0046 # define Q_PRIVATE_SLOT(d, signature) QT_ANNOTATE_CLASS2(qt_private_slot, d, signature)
0047 # define Q_EMIT
0048 #ifndef QT_NO_EMIT
0049 # define emit
0050 #endif
0051 #ifndef Q_CLASSINFO
0052 # define Q_CLASSINFO(name, value)
0053 #endif
0054 #define Q_PLUGIN_METADATA(x) QT_ANNOTATE_CLASS(qt_plugin_metadata, x)
0055 #define Q_INTERFACES(x) QT_ANNOTATE_CLASS(qt_interfaces, x)
0056 #define Q_PROPERTY(...) QT_ANNOTATE_CLASS(qt_property, __VA_ARGS__)
0057 #define Q_PRIVATE_PROPERTY(d, text) QT_ANNOTATE_CLASS2(qt_private_property, d, text)
0058 #ifndef Q_REVISION
0059 # define Q_REVISION(...)
0060 #endif
0061 #define Q_OVERRIDE(text) QT_ANNOTATE_CLASS(qt_override, text)
0062 #define QDOC_PROPERTY(text) QT_ANNOTATE_CLASS(qt_qdoc_property, text)
0063 #define Q_ENUMS(x) QT_ANNOTATE_CLASS(qt_enums, x)
0064 #define Q_FLAGS(x) QT_ANNOTATE_CLASS(qt_enums, x)
0065 #define Q_ENUM_IMPL(ENUM) \
0066 friend constexpr const QMetaObject *qt_getEnumMetaObject(ENUM) noexcept { return &staticMetaObject; } \
0067 friend constexpr const char *qt_getEnumName(ENUM) noexcept { return #ENUM; }
0068 #define Q_ENUM(x) Q_ENUMS(x) Q_ENUM_IMPL(x)
0069 #define Q_FLAG(x) Q_FLAGS(x) Q_ENUM_IMPL(x)
0070 #define Q_ENUM_NS_IMPL(ENUM) \
0071 inline constexpr const QMetaObject *qt_getEnumMetaObject(ENUM) noexcept { return &staticMetaObject; } \
0072 inline constexpr const char *qt_getEnumName(ENUM) noexcept { return #ENUM; }
0073 #define Q_ENUM_NS(x) Q_ENUMS(x) Q_ENUM_NS_IMPL(x)
0074 #define Q_FLAG_NS(x) Q_FLAGS(x) Q_ENUM_NS_IMPL(x)
0075 #define Q_SCRIPTABLE QT_ANNOTATE_FUNCTION(qt_scriptable)
0076 #define Q_INVOKABLE QT_ANNOTATE_FUNCTION(qt_invokable)
0077 #define Q_SIGNAL QT_ANNOTATE_FUNCTION(qt_signal)
0078 #define Q_SLOT QT_ANNOTATE_FUNCTION(qt_slot)
0079 #define Q_MOC_INCLUDE(...) QT_ANNOTATE_CLASS(qt_moc_include, __VA_ARGS__)
0080 #endif
0081
0082 #ifndef QT_NO_TRANSLATION
0083
0084 # define QT_TR_FUNCTIONS \
0085 static inline QString tr(const char *s, const char *c = nullptr, int n = -1) \
0086 { return staticMetaObject.tr(s, c, n); }
0087 #else
0088
0089 # define QT_TR_FUNCTIONS
0090 #endif
0091
0092 #ifdef Q_QDOC
0093 #define QT_TR_FUNCTIONS
0094 #endif
0095
0096 #define Q_DECL_HIDDEN_STATIC_METACALL Q_DECL_HIDDEN
0097
0098 #if defined(Q_CC_CLANG)
0099 # if Q_CC_CLANG >= 1100
0100 # define Q_OBJECT_NO_OVERRIDE_WARNING QT_WARNING_DISABLE_CLANG("-Winconsistent-missing-override") QT_WARNING_DISABLE_CLANG("-Wsuggest-override")
0101 # elif Q_CC_CLANG >= 306
0102 # define Q_OBJECT_NO_OVERRIDE_WARNING QT_WARNING_DISABLE_CLANG("-Winconsistent-missing-override")
0103 # endif
0104 #elif defined(Q_CC_GNU) && Q_CC_GNU >= 501
0105 # define Q_OBJECT_NO_OVERRIDE_WARNING QT_WARNING_DISABLE_GCC("-Wsuggest-override")
0106 #elif defined(Q_CC_MSVC)
0107 # define Q_OBJECT_NO_OVERRIDE_WARNING QT_WARNING_DISABLE_MSVC(26433)
0108 #else
0109 # define Q_OBJECT_NO_OVERRIDE_WARNING
0110 #endif
0111
0112 #if defined(Q_CC_GNU) && Q_CC_GNU >= 600
0113 # define Q_OBJECT_NO_ATTRIBUTES_WARNING QT_WARNING_DISABLE_GCC("-Wattributes")
0114 #else
0115 # define Q_OBJECT_NO_ATTRIBUTES_WARNING
0116 #endif
0117
0118
0119 #define Q_OBJECT \
0120 public: \
0121 QT_WARNING_PUSH \
0122 Q_OBJECT_NO_OVERRIDE_WARNING \
0123 static const QMetaObject staticMetaObject; \
0124 virtual const QMetaObject *metaObject() const; \
0125 virtual void *qt_metacast(const char *); \
0126 virtual int qt_metacall(QMetaObject::Call, int, void **); \
0127 QT_TR_FUNCTIONS \
0128 private: \
0129 Q_OBJECT_NO_ATTRIBUTES_WARNING \
0130 Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
0131 QT_WARNING_POP \
0132 struct QPrivateSignal { explicit QPrivateSignal() = default; }; \
0133 QT_ANNOTATE_CLASS(qt_qobject, "")
0134
0135
0136 #define Q_OBJECT_FAKE Q_OBJECT QT_ANNOTATE_CLASS(qt_fake, "")
0137
0138 #ifndef QT_NO_META_MACROS
0139
0140 #define Q_GADGET_EXPORT(...) \
0141 public: \
0142 static __VA_ARGS__ const QMetaObject staticMetaObject; \
0143 void qt_check_for_QGADGET_macro(); \
0144 typedef void QtGadgetHelper; \
0145 private: \
0146 QT_WARNING_PUSH \
0147 Q_OBJECT_NO_ATTRIBUTES_WARNING \
0148 Q_DECL_HIDDEN_STATIC_METACALL static void qt_static_metacall(QObject *, QMetaObject::Call, int, void **); \
0149 QT_WARNING_POP \
0150 QT_ANNOTATE_CLASS(qt_qgadget, "") \
0151
0152
0153
0154 #define Q_GADGET Q_GADGET_EXPORT()
0155
0156
0157 #define Q_NAMESPACE_EXPORT(...) \
0158 extern __VA_ARGS__ const QMetaObject staticMetaObject; \
0159 QT_ANNOTATE_CLASS(qt_qnamespace, "") \
0160
0161
0162
0163 #define Q_NAMESPACE Q_NAMESPACE_EXPORT() \
0164
0165
0166 #endif
0167
0168 #else
0169 #define slots slots
0170 #define signals signals
0171 #define Q_SLOTS Q_SLOTS
0172 #define Q_SIGNALS Q_SIGNALS
0173 #define Q_CLASSINFO(name, value) Q_CLASSINFO(name, value)
0174 #define Q_INTERFACES(x) Q_INTERFACES(x)
0175 #define Q_PROPERTY(text) Q_PROPERTY(text)
0176 #define Q_PRIVATE_PROPERTY(d, text) Q_PRIVATE_PROPERTY(d, text)
0177 #define Q_PRIVATE_QPROPERTY(accessor, type, name, setter, ...) Q_PRIVATE_QPROPERTY(accessor, type, name, setter, __VA_ARGS__)
0178 #define Q_PRIVATE_QPROPERTIES_BEGIN
0179 #define Q_PRIVATE_QPROPERTY_IMPL(name)
0180 #define Q_PRIVATE_QPROPERTIES_END
0181 #define Q_REVISION(...) Q_REVISION(__VA_ARGS__)
0182 #define Q_OVERRIDE(text) Q_OVERRIDE(text)
0183 #define Q_ENUMS(x) Q_ENUMS(x)
0184 #define Q_FLAGS(x) Q_FLAGS(x)
0185 #define Q_ENUM(x) Q_ENUM(x)
0186 #define Q_FLAGS(x) Q_FLAGS(x)
0187
0188 #define Q_OBJECT Q_OBJECT
0189
0190 #define Q_OBJECT_FAKE Q_OBJECT_FAKE
0191
0192 #define Q_GADGET Q_GADGET
0193 #define Q_SCRIPTABLE Q_SCRIPTABLE
0194 #define Q_INVOKABLE Q_INVOKABLE
0195 #define Q_SIGNAL Q_SIGNAL
0196 #define Q_SLOT Q_SLOT
0197 #endif
0198
0199 QT_END_NAMESPACE
0200
0201 #endif