diff options
author | Lars Knoll <lars.knoll@qt.io> | 2019-04-30 09:55:13 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-06-11 19:39:52 +0200 |
commit | ee709e32366135fb7507b74b8e75d637772b166e (patch) | |
tree | dda16876e67078d9fc35b8d3ffdd9bfc8360ada9 /src/corelib/kernel/qmetaobject_p.h | |
parent | 58a7e4f0bc5e9290cc205762d51adc5806b034fd (diff) |
QMetaMethod: clean up offset handling
Centralize the offset handling in one place and avoid lots of magic
numbers in various places. Expose the number of ints per method in
QMetaObjectPrivate as a constant, so that code in other places can
access it via private API.
Change-Id: I59790287a17ea47e6160ec65d9c8d0aaee748947
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/kernel/qmetaobject_p.h')
-rw-r--r-- | src/corelib/kernel/qmetaobject_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h index b825c983f9..1e5bc06ffe 100644 --- a/src/corelib/kernel/qmetaobject_p.h +++ b/src/corelib/kernel/qmetaobject_p.h @@ -55,6 +55,7 @@ #include <QtCore/qglobal.h> #include <QtCore/qobjectdefs.h> #include <QtCore/qmutex.h> +#include <QtCore/qmetaobject.h> #ifndef QT_NO_QOBJECT #include <private/qobject_p.h> // For QObjectPrivate::Connection #endif @@ -178,7 +179,7 @@ struct QMetaObjectPrivate // revision 8 is Qt 5.12: It adds the enum name to QMetaEnum // revision 9 is Qt 6.0: It adds the metatype of properties and methods enum { OutputRevision = 9 }; // Used by moc, qmetaobjectbuilder and qdbus - enum { IntsPerMethod = 6}; + enum { IntsPerMethod = QMetaMethod::Data::Size}; int revision; int className; |