summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobjectdefs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qobjectdefs.h')
-rw-r--r--src/corelib/kernel/qobjectdefs.h36
1 files changed, 7 insertions, 29 deletions
diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h
index 5cdbef443b..ea4046df55 100644
--- a/src/corelib/kernel/qobjectdefs.h
+++ b/src/corelib/kernel/qobjectdefs.h
@@ -147,34 +147,8 @@ class QString;
# define QT_TR_FUNCTIONS
#endif
-#if defined(QT_NO_QOBJECT_CHECK)
-/* qmake ignore Q_OBJECT */
-#define Q_OBJECT_CHECK
-#else
-
-/* This is a compile time check that ensures that any class cast with qobject_cast
- actually contains a Q_OBJECT macro. Note: qobject_cast will fail if a QObject
- subclass doesn't contain Q_OBJECT.
-
- In qt_check_for_QOBJECT_macro, we call a dummy templated function with two
- parameters, the first being "this" and the other the target of the qobject
- cast. If the types are not identical, we know that a Q_OBJECT macro is missing.
-
- If you get a compiler error here, make sure that the class you are casting
- to contains a Q_OBJECT macro.
-*/
-
-/* qmake ignore Q_OBJECT */
-#define Q_OBJECT_CHECK \
- template <typename ThisObject> inline void qt_check_for_QOBJECT_macro(const ThisObject &_q_argument) const \
- { int i = qYouForgotTheQ_OBJECT_Macro(this, &_q_argument); i = i + 1; }
-
-template <typename T>
-inline int qYouForgotTheQ_OBJECT_Macro(T, T) { return 0; }
-
-template <typename T1, typename T2>
-inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {}
-#endif // QT_NO_QOBJECT_CHECK
+// ### Qt6: remove
+#define Q_OBJECT_CHECK /* empty, unused since Qt 5.2 */
#if defined(Q_CC_INTEL)
// Cannot redefine the visibility of a method in an exported class
@@ -200,7 +174,6 @@ inline void qYouForgotTheQ_OBJECT_Macro(T1, T2) {}
/* qmake ignore Q_OBJECT */
#define Q_OBJECT \
public: \
- Q_OBJECT_CHECK \
QT_WARNING_PUSH \
Q_OBJECT_NO_OVERRIDE_WARNING \
static const QMetaObject staticMetaObject; \
@@ -267,6 +240,11 @@ private: \
#define Q_SLOT Q_SLOT
#endif //Q_MOC_RUN
+#ifdef Q_CLANG_QDOC
+#undef Q_GADGET
+#define Q_GADGET
+#endif
+
#ifndef QT_NO_META_MACROS
// macro for onaming members
#ifdef METHOD