2024-08-25 16:08:24 +12:00
|
|
|
#include <QMetaObject>
|
|
|
|
#include <QObject>
|
|
|
|
#include <QObjectCleanupHandler>
|
|
|
|
#include <QString>
|
2024-08-29 19:01:51 +12:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-10-16 18:07:56 +13:00
|
|
|
#include <qobjectcleanuphandler.h>
|
2024-08-29 19:01:51 +12:00
|
|
|
#include "gen_qobjectcleanuphandler.h"
|
2024-09-15 10:29:05 +12:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 16:08:24 +12:00
|
|
|
|
|
|
|
QObjectCleanupHandler* QObjectCleanupHandler_new() {
|
|
|
|
return new QObjectCleanupHandler();
|
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self) {
|
|
|
|
return (QMetaObject*) self->metaObject();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-21 10:32:57 +12:00
|
|
|
void* QObjectCleanupHandler_Metacast(QObjectCleanupHandler* self, const char* param1) {
|
|
|
|
return self->qt_metacast(param1);
|
|
|
|
}
|
|
|
|
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string QObjectCleanupHandler_Tr(const char* s) {
|
2024-09-15 10:29:05 +12:00
|
|
|
QString _ret = QObjectCleanupHandler::tr(s);
|
2024-08-25 16:08:24 +12:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-15 10:29:05 +12:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string QObjectCleanupHandler_TrUtf8(const char* s) {
|
2024-09-15 10:29:05 +12:00
|
|
|
QString _ret = QObjectCleanupHandler::trUtf8(s);
|
2024-08-25 16:08:24 +12:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-15 10:29:05 +12:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
QObject* QObjectCleanupHandler_Add(QObjectCleanupHandler* self, QObject* object) {
|
|
|
|
return self->add(object);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QObjectCleanupHandler_Remove(QObjectCleanupHandler* self, QObject* object) {
|
|
|
|
self->remove(object);
|
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
bool QObjectCleanupHandler_IsEmpty(const QObjectCleanupHandler* self) {
|
|
|
|
return self->isEmpty();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
void QObjectCleanupHandler_Clear(QObjectCleanupHandler* self) {
|
|
|
|
self->clear();
|
|
|
|
}
|
|
|
|
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string QObjectCleanupHandler_Tr2(const char* s, const char* c) {
|
2024-09-15 10:29:05 +12:00
|
|
|
QString _ret = QObjectCleanupHandler::tr(s, c);
|
2024-08-25 16:08:24 +12:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-15 10:29:05 +12:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string QObjectCleanupHandler_Tr3(const char* s, const char* c, int n) {
|
2024-09-15 10:29:05 +12:00
|
|
|
QString _ret = QObjectCleanupHandler::tr(s, c, static_cast<int>(n));
|
2024-08-25 16:08:24 +12:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-15 10:29:05 +12:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string QObjectCleanupHandler_TrUtf82(const char* s, const char* c) {
|
2024-09-15 10:29:05 +12:00
|
|
|
QString _ret = QObjectCleanupHandler::trUtf8(s, c);
|
2024-08-25 16:08:24 +12:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-15 10:29:05 +12:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string QObjectCleanupHandler_TrUtf83(const char* s, const char* c, int n) {
|
2024-09-15 10:29:05 +12:00
|
|
|
QString _ret = QObjectCleanupHandler::trUtf8(s, c, static_cast<int>(n));
|
2024-08-25 16:08:24 +12:00
|
|
|
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
|
2024-09-15 10:29:05 +12:00
|
|
|
QByteArray _b = _ret.toUtf8();
|
2024-10-19 12:53:33 +13:00
|
|
|
struct miqt_string _ms;
|
|
|
|
_ms.len = _b.length();
|
|
|
|
_ms.data = static_cast<char*>(malloc(_ms.len));
|
|
|
|
memcpy(_ms.data, _b.data(), _ms.len);
|
|
|
|
return _ms;
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|