miqt/qt/gen_qobjectcleanuphandler.cpp

85 lines
2.8 KiB
C++

#include <QMetaObject>
#include <QObject>
#include <QObjectCleanupHandler>
#include <QString>
#include <QByteArray>
#include <cstring>
#include "qobjectcleanuphandler.h"
#include "gen_qobjectcleanuphandler.h"
#include "_cgo_export.h"
QObjectCleanupHandler* QObjectCleanupHandler_new() {
return new QObjectCleanupHandler();
}
QMetaObject* QObjectCleanupHandler_MetaObject(const QObjectCleanupHandler* self) {
return (QMetaObject*) self->metaObject();
}
void* QObjectCleanupHandler_Metacast(QObjectCleanupHandler* self, const char* param1) {
return self->qt_metacast(param1);
}
struct miqt_string* QObjectCleanupHandler_Tr(const char* s) {
QString _ret = QObjectCleanupHandler::tr(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QObjectCleanupHandler_TrUtf8(const char* s) {
QString _ret = QObjectCleanupHandler::trUtf8(s);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
QObject* QObjectCleanupHandler_Add(QObjectCleanupHandler* self, QObject* object) {
return self->add(object);
}
void QObjectCleanupHandler_Remove(QObjectCleanupHandler* self, QObject* object) {
self->remove(object);
}
bool QObjectCleanupHandler_IsEmpty(const QObjectCleanupHandler* self) {
return self->isEmpty();
}
void QObjectCleanupHandler_Clear(QObjectCleanupHandler* self) {
self->clear();
}
struct miqt_string* QObjectCleanupHandler_Tr2(const char* s, const char* c) {
QString _ret = QObjectCleanupHandler::tr(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QObjectCleanupHandler_Tr3(const char* s, const char* c, int n) {
QString _ret = QObjectCleanupHandler::tr(s, c, static_cast<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QObjectCleanupHandler_TrUtf82(const char* s, const char* c) {
QString _ret = QObjectCleanupHandler::trUtf8(s, c);
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
struct miqt_string* QObjectCleanupHandler_TrUtf83(const char* s, const char* c, int n) {
QString _ret = QObjectCleanupHandler::trUtf8(s, c, static_cast<int>(n));
// Convert QString from UTF-16 in C++ RAII memory to UTF-8 in manually-managed C memory
QByteArray _b = _ret.toUtf8();
return miqt_strdup(_b.data(), _b.length());
}
void QObjectCleanupHandler_Delete(QObjectCleanupHandler* self) {
delete self;
}