summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Komissarov <abbapoh@gmail.com>2021-02-06 18:03:58 +0100
committerIvan Komissarov <abbapoh@gmail.com>2021-02-11 19:10:12 +0100
commite19477e1129a4c64e023006c59878637d594e99e (patch)
tree2de56ebef7e7485c3ac9f8089f29100b28bc3700
parentd4206b21c56e8307d1439a8f10a8cd68bb6c714e (diff)
Fix moc patches in QObjectConnectionManager
Since qt6, the moc implementation has been changed. Apply fixes accordingly. Change-Id: I3f6894a0e5b0dc8569441275a3f9756bfecd8adf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
-rw-r--r--src/script/bridge/qscriptqobject.cpp35
1 files changed, 33 insertions, 2 deletions
diff --git a/src/script/bridge/qscriptqobject.cpp b/src/script/bridge/qscriptqobject.cpp
index 17e4524..621f687 100644
--- a/src/script/bridge/qscriptqobject.cpp
+++ b/src/script/bridge/qscriptqobject.cpp
@@ -463,7 +463,7 @@ static QMetaMethod metaMethod(const QMetaObject *meta,
else
return meta->constructor(index);
}
-
+
/*!
\internal
Derives the actual method to call based on the script arguments,
@@ -2009,8 +2009,12 @@ JSC::JSValue QMetaObjectWrapperObject::execute(JSC::ExecState *exec,
struct StaticQtMetaObject : public QObject
{
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+ static const QMetaObject *get() { return &Qt::staticMetaObject; }
+#else
static const QMetaObject *get()
{ return &static_cast<StaticQtMetaObject*> (0)->staticQtMetaObject; }
+#endif
};
static JSC::JSValue JSC_HOST_CALL qmetaobjectProtoFuncClassName(
@@ -2033,6 +2037,14 @@ QMetaObjectPrototype::QMetaObjectPrototype(
}
// Begin moc-generated code -- modify with care! Check "HAND EDIT" parts
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+struct qt_meta_stringdata_QObjectConnectionManager_t {
+ const uint offsetsAndSize[6];
+ char stringdata[44];
+};
+#define QT_MOC_LITERAL(ofs, len) \
+ uint(offsetof(qt_meta_stringdata_QObjectConnectionManager_t, stringdata) + ofs), len
+#else
struct qt_meta_stringdata_QObjectConnectionManager_t {
QByteArrayData data[3];
char stringdata[44];
@@ -2042,11 +2054,18 @@ struct qt_meta_stringdata_QObjectConnectionManager_t {
offsetof(qt_meta_stringdata_QObjectConnectionManager_t, stringdata) + ofs \
- idx * sizeof(QByteArrayData) \
}
+#endif
static const qt_meta_stringdata_QObjectConnectionManager_t qt_meta_stringdata_QObjectConnectionManager = {
{
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+QT_MOC_LITERAL(0, 33), // "QScript::QObjectConnectionManager..."
+QT_MOC_LITERAL(34, 7), // "execute"
+QT_MOC_LITERAL(42, 0) // ""
+#else
QT_MOC_LITERAL(0, 0, 33),
QT_MOC_LITERAL(1, 34, 7),
QT_MOC_LITERAL(2, 42, 0)
+#endif
},
"QScript::QObjectConnectionManager\0"
"execute\0\0"
@@ -2056,7 +2075,7 @@ QT_MOC_LITERAL(2, 42, 0)
static const uint qt_meta_data_QObjectConnectionManager[] = {
// content:
- 7, // revision
+ 9, // revision
0, // classname
0, 0, // classinfo
1, 14, // methods
@@ -2086,8 +2105,20 @@ void QObjectConnectionManager::qt_static_metacall(QObject *_o, QMetaObject::Call
}
const QMetaObject QObjectConnectionManager::staticMetaObject = {
+#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
+ {
+ QMetaObject::SuperData::link<QObject::staticMetaObject>(),
+ qt_meta_stringdata_QObjectConnectionManager.offsetsAndSize,
+ qt_meta_data_QObjectConnectionManager,
+ qt_static_metacall,
+ nullptr,
+ nullptr,
+ nullptr
+ }
+#else
{ &QObject::staticMetaObject, qt_meta_stringdata_QObjectConnectionManager.data,
qt_meta_data_QObjectConnectionManager, qt_static_metacall, 0, 0 }
+#endif
};
const QMetaObject *QObjectConnectionManager::metaObject() const