summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetaobject_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/kernel/qmetaobject_p.h')
-rw-r--r--src/corelib/kernel/qmetaobject_p.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h
index d08c184d0b..d2c36fceb4 100644
--- a/src/corelib/kernel/qmetaobject_p.h
+++ b/src/corelib/kernel/qmetaobject_p.h
@@ -23,11 +23,14 @@
#ifndef QT_NO_QOBJECT
#include <private/qobject_p.h> // For QObjectPrivate::Connection
#endif
+#include <private/qtools_p.h>
#include <QtCore/qvarlengtharray.h>
QT_BEGIN_NAMESPACE
// ### TODO - QTBUG-87869: wrap in a proper Q_NAMESPACE and use scoped enums, to avoid name clashes
+using namespace QtMiscUtils;
+
enum PropertyFlags {
Invalid = 0x00000000,
Readable = 0x00000001,
@@ -160,7 +163,8 @@ public:
// shadows the public function
static InvokeFailReason Q_CORE_EXPORT
invokeImpl(QMetaMethod self, void *target, Qt::ConnectionType, qsizetype paramCount,
- const void *const *parameters, const char *const *typeNames);
+ const void *const *parameters, const char *const *typeNames,
+ const QtPrivate::QMetaTypeInterface *const *metaTypes);
};
struct QMetaObjectPrivate
@@ -170,7 +174,9 @@ struct QMetaObjectPrivate
// revision 9 is Qt 6.0: It adds the metatype of properties and methods
// revision 10 is Qt 6.2: The metatype of the metaobject is stored in the metatypes array
// and metamethods store a flag stating whether they are const
- enum { OutputRevision = 10 }; // Used by moc, qmetaobjectbuilder and qdbus
+ // revision 11 is Qt 6.5: The metatype for void is stored in the metatypes array
+ // revision 12 is Qt 6.6: It adds the metatype for enums
+ enum { OutputRevision = 12 }; // Used by moc, qmetaobjectbuilder and qdbus
enum { IntsPerMethod = QMetaMethod::Data::Size };
enum { IntsPerEnum = QMetaEnum::Data::Size };
enum { IntsPerProperty = QMetaProperty::Data::Size };
@@ -206,6 +212,11 @@ struct QMetaObjectPrivate
int argc, const QArgumentType *types);
static int indexOfConstructor(const QMetaObject *m, const QByteArray &name,
int argc, const QArgumentType *types);
+
+ enum class Which { Name, Alias };
+ static int indexOfEnumerator(const QMetaObject *m, QByteArrayView name, Which which);
+ static int indexOfEnumerator(const QMetaObject *m, QByteArrayView name);
+
Q_CORE_EXPORT static QMetaMethod signal(const QMetaObject *m, int signal_index);
static inline int signalOffset(const QMetaObject *m)
{
@@ -263,11 +274,7 @@ enum { MetaObjectPrivateFieldCount = sizeof(QMetaObjectPrivate) / sizeof(int) };
// mirrored in moc's utils.h
static inline bool is_ident_char(char s)
{
- return ((s >= 'a' && s <= 'z')
- || (s >= 'A' && s <= 'Z')
- || (s >= '0' && s <= '9')
- || s == '_'
- );
+ return isAsciiLetterOrNumber(s) || s == '_';
}
static inline bool is_space(char s)