2024-08-25 16:08:24 +12:00
|
|
|
#include <QLoggingCategory>
|
|
|
|
#include <QString>
|
2024-08-29 19:01:51 +12:00
|
|
|
#include <QByteArray>
|
|
|
|
#include <cstring>
|
2024-10-16 18:07:56 +13:00
|
|
|
#include <qloggingcategory.h>
|
2024-08-29 19:01:51 +12:00
|
|
|
#include "gen_qloggingcategory.h"
|
2024-09-15 10:29:05 +12:00
|
|
|
#include "_cgo_export.h"
|
2024-08-25 16:08:24 +12:00
|
|
|
|
2024-08-29 19:01:51 +12:00
|
|
|
QLoggingCategory* QLoggingCategory_new(const char* category) {
|
2024-08-25 16:08:24 +12:00
|
|
|
return new QLoggingCategory(category);
|
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
bool QLoggingCategory_IsDebugEnabled(const QLoggingCategory* self) {
|
|
|
|
return self->isDebugEnabled();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
bool QLoggingCategory_IsInfoEnabled(const QLoggingCategory* self) {
|
|
|
|
return self->isInfoEnabled();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
bool QLoggingCategory_IsWarningEnabled(const QLoggingCategory* self) {
|
|
|
|
return self->isWarningEnabled();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
bool QLoggingCategory_IsCriticalEnabled(const QLoggingCategory* self) {
|
|
|
|
return self->isCriticalEnabled();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
const char* QLoggingCategory_CategoryName(const QLoggingCategory* self) {
|
|
|
|
return (const char*) self->categoryName();
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
QLoggingCategory* QLoggingCategory_OperatorCall(QLoggingCategory* self) {
|
2024-09-15 10:29:05 +12:00
|
|
|
QLoggingCategory& _ret = self->operator()();
|
2024-08-25 16:08:24 +12:00
|
|
|
// Cast returned reference into pointer
|
2024-09-15 10:29:05 +12:00
|
|
|
return &_ret;
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
2024-09-11 17:41:09 +12:00
|
|
|
QLoggingCategory* QLoggingCategory_OperatorCall2(const QLoggingCategory* self) {
|
2024-09-15 10:29:05 +12:00
|
|
|
const QLoggingCategory& _ret = self->operator()();
|
2024-08-25 16:08:24 +12:00
|
|
|
// Cast returned reference into pointer
|
2024-09-15 10:29:05 +12:00
|
|
|
return const_cast<QLoggingCategory*>(&_ret);
|
2024-08-25 16:08:24 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
QLoggingCategory* QLoggingCategory_DefaultCategory() {
|
|
|
|
return QLoggingCategory::defaultCategory();
|
|
|
|
}
|
|
|
|
|
2024-10-19 12:53:33 +13:00
|
|
|
void QLoggingCategory_SetFilterRules(struct miqt_string rules) {
|
|
|
|
QString rules_QString = QString::fromUtf8(rules.data, rules.len);
|
2024-08-25 16:08:24 +12:00
|
|
|
QLoggingCategory::setFilterRules(rules_QString);
|
|
|
|
}
|
|
|
|
|
|
|
|
void QLoggingCategory_Delete(QLoggingCategory* self) {
|
|
|
|
delete self;
|
|
|
|
}
|
|
|
|
|