qt: rebuild (QObjectData_dynamicMetaObject handling for Qt 6.9)

This commit is contained in:
Rick Calixte 2025-04-10 19:46:01 -04:00
parent 9d72a3f601
commit 1c04e1a749
No known key found for this signature in database
2 changed files with 16 additions and 0 deletions

View File

@ -36,7 +36,13 @@ void miqt_exec_callback_QObject_disconnectNotify(QObject*, intptr_t, QMetaMethod
} /* extern C */
#endif
// This method's return type was changed from non-const to const in Qt 6.9
#if QT_VERSION >= QT_VERSION_CHECK(6,9,0)
const QMetaObject* QObjectData_dynamicMetaObject(const QObjectData* self) {
#else
QMetaObject* QObjectData_dynamicMetaObject(const QObjectData* self) {
#endif
return self->dynamicMetaObject();
}

View File

@ -14,6 +14,11 @@
extern "C" {
#endif
// Based on the macro from Qt (LGPL v3), see https://www.qt.io/qt-licensing
// Macro is trivial and used here under fair use
// Usage does not imply derivation
#define QT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch))
#ifdef __cplusplus
class QAnyStringView;
class QBindingStorage;
@ -48,7 +53,12 @@ typedef struct QTimerEvent QTimerEvent;
typedef struct QVariant QVariant;
#endif
// This method's return type was changed from non-const to const in Qt 6.9
#if QT_VERSION >= QT_VERSION_CHECK(6,9,0)
const QMetaObject* QObjectData_dynamicMetaObject(const QObjectData* self);
#else
QMetaObject* QObjectData_dynamicMetaObject(const QObjectData* self);
#endif
void QObjectData_delete(QObjectData* self);
QObject* QObject_new();