miqt/qt6/gen_qloggingcategory.cpp

66 lines
1.7 KiB
C++
Raw Normal View History

2024-10-20 05:21:03 +00:00
#include <QLoggingCategory>
#include <QString>
#include <QByteArray>
#include <cstring>
#include <qloggingcategory.h>
#include "gen_qloggingcategory.h"
#ifndef _Bool
#define _Bool bool
#endif
2024-10-20 05:21:03 +00:00
#include "_cgo_export.h"
2024-12-07 04:15:57 +00:00
QLoggingCategory* QLoggingCategory_new(const char* category) {
return new QLoggingCategory(category);
2024-10-20 05:21:03 +00:00
}
bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self) {
return self->isDebugEnabled();
}
bool QLoggingCategory_IsInfoEnabled(const QLoggingCategory* self) {
return self->isInfoEnabled();
}
bool QLoggingCategory_IsWarningEnabled(const QLoggingCategory* self) {
return self->isWarningEnabled();
}
bool QLoggingCategory_IsCriticalEnabled(const QLoggingCategory* self) {
return self->isCriticalEnabled();
}
const char* QLoggingCategory_CategoryName(const QLoggingCategory* self) {
return (const char*) self->categoryName();
}
QLoggingCategory* QLoggingCategory_OperatorCall(QLoggingCategory* self) {
QLoggingCategory& _ret = self->operator()();
// Cast returned reference into pointer
return &_ret;
}
QLoggingCategory* QLoggingCategory_OperatorCall2(const QLoggingCategory* self) {
const QLoggingCategory& _ret = self->operator()();
// Cast returned reference into pointer
return const_cast<QLoggingCategory*>(&_ret);
}
QLoggingCategory* QLoggingCategory_DefaultCategory() {
return QLoggingCategory::defaultCategory();
}
void QLoggingCategory_SetFilterRules(struct miqt_string rules) {
QString rules_QString = QString::fromUtf8(rules.data, rules.len);
QLoggingCategory::setFilterRules(rules_QString);
}
2024-11-19 06:29:06 +00:00
void QLoggingCategory_Delete(QLoggingCategory* self, bool isSubclass) {
if (isSubclass) {
delete dynamic_cast<QLoggingCategory*>( self );
} else {
delete self;
}
2024-10-20 05:21:03 +00:00
}