From 51039917996909284fbc2d776a9b8f71fe5e6f9a Mon Sep 17 00:00:00 2001 From: Zhao Yuhang <2546789017@qq.com> Date: 周六, 02 12月 2023 17:43:17 +0800 Subject: [PATCH] wip --- src/core/qwkcoreglobal.h | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/core/qwkcoreglobal.h b/src/core/qwkcoreglobal.h index 7cba597..517d91c 100644 --- a/src/core/qwkcoreglobal.h +++ b/src/core/qwkcoreglobal.h @@ -1,7 +1,7 @@ #ifndef QWKCOREGLOBAL_H #define QWKCOREGLOBAL_H -#include <QtGlobal> +#include <QtCore/QLoggingCategory> #ifndef QWK_CORE_EXPORT # ifdef QWK_CORE_STATIC @@ -15,4 +15,14 @@ # endif #endif +QWK_CORE_EXPORT Q_DECLARE_LOGGING_CATEGORY(qWindowKitLog) + +#define QWK_INFO qCInfo(qWindowKitLog) +#define QWK_DEBUG qCDebug(qWindowKitLog) +#define QWK_WARNING qCWarning(qWindowKitLog) +#define QWK_CRITICAL qCCritical(qWindowKitLog) +#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 0) +# define QWK_FATAL qCFatal(qWindowKitLog) +#endif + #endif // QWKCOREGLOBAL_H -- Gitblit v1.9.1