use better solution to disable logging

Thank very much to @SineStriker !

Fixes: #181

Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
Yuhang Zhao 2022-11-10 14:15:05 +08:00
parent b8a3ff604f
commit 70a71822da
32 changed files with 384 additions and 158 deletions

View File

@ -30,10 +30,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcChromePalette, "wangwenx190.framelesshelper.core.chromepalette")
#define INFO qCInfo(lcChromePalette)
#define DEBUG qCDebug(lcChromePalette)
#define WARNING qCWarning(lcChromePalette)
#define CRITICAL qCCritical(lcChromePalette)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcChromePalette)
# define DEBUG qCDebug(lcChromePalette)
# define WARNING qCWarning(lcChromePalette)
# define CRITICAL qCCritical(lcChromePalette)
#endif
using namespace Global;

View File

@ -31,10 +31,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessConfig, "wangwenx190.framelesshelper.core.framelessconfig")
#define INFO qCInfo(lcFramelessConfig)
#define DEBUG qCDebug(lcFramelessConfig)
#define WARNING qCWarning(lcFramelessConfig)
#define CRITICAL qCCritical(lcFramelessConfig)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessConfig)
# define DEBUG qCDebug(lcFramelessConfig)
# define WARNING qCWarning(lcFramelessConfig)
# define CRITICAL qCCritical(lcFramelessConfig)
#endif
using namespace Global;

View File

@ -34,10 +34,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessHelperQt, "wangwenx190.framelesshelper.core.impl.qt")
#define INFO qCInfo(lcFramelessHelperQt)
#define DEBUG qCDebug(lcFramelessHelperQt)
#define WARNING qCWarning(lcFramelessHelperQt)
#define CRITICAL qCCritical(lcFramelessHelperQt)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessHelperQt)
# define DEBUG qCDebug(lcFramelessHelperQt)
# define WARNING qCWarning(lcFramelessHelperQt)
# define CRITICAL qCCritical(lcFramelessHelperQt)
#endif
using namespace Global;

View File

@ -38,10 +38,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessHelperWin, "wangwenx190.framelesshelper.core.impl.win")
#define INFO qCInfo(lcFramelessHelperWin)
#define DEBUG qCDebug(lcFramelessHelperWin)
#define WARNING qCWarning(lcFramelessHelperWin)
#define CRITICAL qCCritical(lcFramelessHelperWin)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessHelperWin)
# define DEBUG qCDebug(lcFramelessHelperWin)
# define WARNING qCWarning(lcFramelessHelperWin)
# define CRITICAL qCCritical(lcFramelessHelperWin)
#endif
using namespace Global;

View File

@ -75,10 +75,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcCoreGlobal, "wangwenx190.framelesshelper.core.global")
#define INFO qCInfo(lcCoreGlobal)
#define DEBUG qCDebug(lcCoreGlobal)
#define WARNING qCWarning(lcCoreGlobal)
#define CRITICAL qCCritical(lcCoreGlobal)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcCoreGlobal)
# define DEBUG qCDebug(lcCoreGlobal)
# define WARNING qCWarning(lcCoreGlobal)
# define CRITICAL qCCritical(lcCoreGlobal)
#endif
using namespace Global;
@ -96,40 +104,16 @@ FRAMELESSHELPER_BYTEARRAY_CONSTANT(xcb)
#endif
[[maybe_unused]] static constexpr const char kNoLogoEnvVar[] = "FRAMELESSHELPER_NO_LOGO";
FRAMELESSHELPER_STRING_CONSTANT2(FramelessHelperLogPrefix, "wangwenx190.framelesshelper.")
struct CoreData
{
QMutex mutex;
QList<InitializeHookCallback> initHooks = {};
QList<UninitializeHookCallback> uninitHooks = {};
QLoggingCategory::CategoryFilter oldCategoryFilter = nullptr;
};
Q_GLOBAL_STATIC(CoreData, coreData)
[[maybe_unused]] static inline void flhCategoryFilter(QLoggingCategory *category)
{
Q_ASSERT(category);
if (!category) {
return;
}
coreData()->mutex.lock();
if (coreData()->oldCategoryFilter) {
coreData()->oldCategoryFilter(category);
}
coreData()->mutex.unlock();
const QString categoryName = QUtf8String(category->categoryName());
if (!categoryName.isEmpty()
&& categoryName.startsWith(kFramelessHelperLogPrefix, Qt::CaseInsensitive)) {
category->setEnabled(QtInfoMsg, false);
category->setEnabled(QtDebugMsg, false);
category->setEnabled(QtWarningMsg, false);
category->setEnabled(QtCriticalMsg, false);
// QtFatalMsg cannot be changed; it will always remain true.
}
}
namespace FramelessHelper::Core
{
@ -141,12 +125,6 @@ void initialize()
}
inited = true;
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
coreData()->mutex.lock();
coreData()->oldCategoryFilter = QLoggingCategory::installFilter(flhCategoryFilter);
coreData()->mutex.unlock();
#endif
outputLogo();
#ifdef Q_OS_LINUX

View File

@ -52,10 +52,18 @@ static inline void initResource()
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessManager, "wangwenx190.framelesshelper.core.framelessmanager")
#define INFO qCInfo(lcFramelessManager)
#define DEBUG qCDebug(lcFramelessManager)
#define WARNING qCWarning(lcFramelessManager)
#define CRITICAL qCCritical(lcFramelessManager)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessManager)
# define DEBUG qCDebug(lcFramelessManager)
# define WARNING qCWarning(lcFramelessManager)
# define CRITICAL qCCritical(lcFramelessManager)
#endif
using namespace Global;

View File

@ -49,10 +49,18 @@ static inline void initResource()
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcMicaMaterial, "wangwenx190.framelesshelper.core.micamaterial")
#define INFO qCInfo(lcMicaMaterial)
#define DEBUG qCDebug(lcMicaMaterial)
#define WARNING qCWarning(lcMicaMaterial)
#define CRITICAL qCCritical(lcMicaMaterial)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcMicaMaterial)
# define DEBUG qCDebug(lcMicaMaterial)
# define WARNING qCWarning(lcMicaMaterial)
# define CRITICAL qCCritical(lcMicaMaterial)
#endif
using namespace Global;

View File

@ -33,10 +33,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcCoreRegistryKey, "wangwenx190.framelesshelper.core.registrykey")
#define INFO qCInfo(lcCoreRegistryKey)
#define DEBUG qCDebug(lcCoreRegistryKey)
#define WARNING qCWarning(lcCoreRegistryKey)
#define CRITICAL qCCritical(lcCoreRegistryKey)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcCoreRegistryKey)
# define DEBUG qCDebug(lcCoreRegistryKey)
# define WARNING qCWarning(lcCoreRegistryKey)
# define CRITICAL qCCritical(lcCoreRegistryKey)
#endif
using namespace Global;

View File

@ -34,10 +34,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcSysApiLoader, "wangwenx190.framelesshelper.core.sysapiloader")
#define INFO qCInfo(lcSysApiLoader)
#define DEBUG qCDebug(lcSysApiLoader)
#define WARNING qCWarning(lcSysApiLoader)
#define CRITICAL qCCritical(lcSysApiLoader)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcSysApiLoader)
# define DEBUG qCDebug(lcSysApiLoader)
# define WARNING qCWarning(lcSysApiLoader)
# define CRITICAL qCCritical(lcSysApiLoader)
#endif
struct SysApiLoaderData
{

View File

@ -39,10 +39,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcUtilsCommon, "wangwenx190.framelesshelper.core.utils.common")
#define INFO qCInfo(lcUtilsCommon)
#define DEBUG qCDebug(lcUtilsCommon)
#define WARNING qCWarning(lcUtilsCommon)
#define CRITICAL qCCritical(lcUtilsCommon)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcUtilsCommon)
# define DEBUG qCDebug(lcUtilsCommon)
# define WARNING qCWarning(lcUtilsCommon)
# define CRITICAL qCCritical(lcUtilsCommon)
#endif
using namespace Global;

View File

@ -575,10 +575,18 @@ Q_DECLARE_METATYPE(QMargins)
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcUtilsWin, "wangwenx190.framelesshelper.core.utils.win")
#define INFO qCInfo(lcUtilsWin)
#define DEBUG qCDebug(lcUtilsWin)
#define WARNING qCWarning(lcUtilsWin)
#define CRITICAL qCCritical(lcUtilsWin)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcUtilsWin)
# define DEBUG qCDebug(lcUtilsWin)
# define WARNING qCWarning(lcUtilsWin)
# define CRITICAL qCCritical(lcUtilsWin)
#endif
using namespace Global;

View File

@ -34,10 +34,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcWindowBorderPainter, "wangwenx190.framelesshelper.core.windowborderpainter")
#define INFO qCInfo(lcWindowBorderPainter)
#define DEBUG qCDebug(lcWindowBorderPainter)
#define WARNING qCWarning(lcWindowBorderPainter)
#define CRITICAL qCCritical(lcWindowBorderPainter)
#ifdef FRAMELESSHELPER_CORE_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcWindowBorderPainter)
# define DEBUG qCDebug(lcWindowBorderPainter)
# define WARNING qCWarning(lcWindowBorderPainter)
# define CRITICAL qCCritical(lcWindowBorderPainter)
#endif
using namespace Global;

View File

@ -45,10 +45,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQuickGlobal, "wangwenx190.framelesshelper.quick.global")
#define INFO qCInfo(lcQuickGlobal)
#define DEBUG qCDebug(lcQuickGlobal)
#define WARNING qCWarning(lcQuickGlobal)
#define CRITICAL qCCritical(lcQuickGlobal)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcQuickGlobal)
# define DEBUG qCDebug(lcQuickGlobal)
# define WARNING qCWarning(lcQuickGlobal)
# define CRITICAL qCCritical(lcQuickGlobal)
#endif
QuickGlobal::QuickGlobal(QObject *parent) : QObject(parent)
{

View File

@ -31,10 +31,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessQuickApplicationWindow, "wangwenx190.framelesshelper.quick.framelessquickapplicationwindow")
#define INFO qCInfo(lcFramelessQuickApplicationWindow)
#define DEBUG qCDebug(lcFramelessQuickApplicationWindow)
#define WARNING qCWarning(lcFramelessQuickApplicationWindow)
#define CRITICAL qCCritical(lcFramelessQuickApplicationWindow)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessQuickApplicationWindow)
# define DEBUG qCDebug(lcFramelessQuickApplicationWindow)
# define WARNING qCWarning(lcFramelessQuickApplicationWindow)
# define CRITICAL qCCritical(lcFramelessQuickApplicationWindow)
#endif
using namespace Global;

View File

@ -46,10 +46,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessQuickHelper, "wangwenx190.framelesshelper.quick.framelessquickhelper")
#define INFO qCInfo(lcFramelessQuickHelper)
#define DEBUG qCDebug(lcFramelessQuickHelper)
#define WARNING qCWarning(lcFramelessQuickHelper)
#define CRITICAL qCCritical(lcFramelessQuickHelper)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessQuickHelper)
# define DEBUG qCDebug(lcFramelessQuickHelper)
# define WARNING qCWarning(lcFramelessQuickHelper)
# define CRITICAL qCCritical(lcFramelessQuickHelper)
#endif
using namespace Global;

View File

@ -51,10 +51,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQuickModule, "wangwenx190.framelesshelper.quick.quickmodule")
#define INFO qCInfo(lcQuickModule)
#define DEBUG qCDebug(lcQuickModule)
#define WARNING qCWarning(lcQuickModule)
#define CRITICAL qCCritical(lcQuickModule)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcQuickModule)
# define DEBUG qCDebug(lcQuickModule)
# define WARNING qCWarning(lcQuickModule)
# define CRITICAL qCCritical(lcQuickModule)
#endif
void FramelessHelper::Quick::registerTypes(QQmlEngine *engine)
{

View File

@ -32,10 +32,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessQuickUtils, "wangwenx190.framelesshelper.quick.framelessquickutils")
#define INFO qCInfo(lcFramelessQuickUtils)
#define DEBUG qCDebug(lcFramelessQuickUtils)
#define WARNING qCWarning(lcFramelessQuickUtils)
#define CRITICAL qCCritical(lcFramelessQuickUtils)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessQuickUtils)
# define DEBUG qCDebug(lcFramelessQuickUtils)
# define WARNING qCWarning(lcFramelessQuickUtils)
# define CRITICAL qCCritical(lcFramelessQuickUtils)
#endif
using namespace Global;

View File

@ -31,10 +31,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessQuickWindow, "wangwenx190.framelesshelper.quick.framelessquickwindow")
#define INFO qCInfo(lcFramelessQuickWindow)
#define DEBUG qCDebug(lcFramelessQuickWindow)
#define WARNING qCWarning(lcFramelessQuickWindow)
#define CRITICAL qCCritical(lcFramelessQuickWindow)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessQuickWindow)
# define DEBUG qCDebug(lcFramelessQuickWindow)
# define WARNING qCWarning(lcFramelessQuickWindow)
# define CRITICAL qCCritical(lcFramelessQuickWindow)
#endif
using namespace Global;

View File

@ -27,10 +27,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQuickChromePalette, "wangwenx190.framelesshelper.quick.quickchromepalette")
#define INFO qCInfo(lcQuickChromePalette)
#define DEBUG qCDebug(lcQuickChromePalette)
#define WARNING qCWarning(lcQuickChromePalette)
#define CRITICAL qCCritical(lcQuickChromePalette)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcQuickChromePalette)
# define DEBUG qCDebug(lcQuickChromePalette)
# define WARNING qCWarning(lcQuickChromePalette)
# define CRITICAL qCCritical(lcQuickChromePalette)
#endif
QuickChromePalette::QuickChromePalette(QObject *parent) : ChromePalette(parent)
{

View File

@ -32,10 +32,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQuickImageItem, "wangwenx190.framelesshelper.quick.quickimageitem")
#define INFO qCInfo(lcQuickImageItem)
#define DEBUG qCDebug(lcQuickImageItem)
#define WARNING qCWarning(lcQuickImageItem)
#define CRITICAL qCCritical(lcQuickImageItem)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcQuickImageItem)
# define DEBUG qCDebug(lcQuickImageItem)
# define WARNING qCWarning(lcQuickImageItem)
# define CRITICAL qCCritical(lcQuickImageItem)
#endif
using namespace Global;

View File

@ -36,10 +36,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQuickMicaMaterial, "wangwenx190.framelesshelper.quick.quickmicamaterial")
#define INFO qCInfo(lcQuickMicaMaterial)
#define DEBUG qCDebug(lcQuickMicaMaterial)
#define WARNING qCWarning(lcQuickMicaMaterial)
#define CRITICAL qCCritical(lcQuickMicaMaterial)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcQuickMicaMaterial)
# define DEBUG qCDebug(lcQuickMicaMaterial)
# define WARNING qCWarning(lcQuickMicaMaterial)
# define CRITICAL qCCritical(lcQuickMicaMaterial)
#endif
using namespace Global;

View File

@ -36,10 +36,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQuickStandardSystemButton, "wangwenx190.framelesshelper.quick.quickstandardsystembutton")
#define INFO qCInfo(lcQuickStandardSystemButton)
#define DEBUG qCDebug(lcQuickStandardSystemButton)
#define WARNING qCWarning(lcQuickStandardSystemButton)
#define CRITICAL qCCritical(lcQuickStandardSystemButton)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcQuickStandardSystemButton)
# define DEBUG qCDebug(lcQuickStandardSystemButton)
# define WARNING qCWarning(lcQuickStandardSystemButton)
# define CRITICAL qCCritical(lcQuickStandardSystemButton)
#endif
using namespace Global;

View File

@ -39,10 +39,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQuickStandardTitleBar, "wangwenx190.framelesshelper.quick.quickstandardtitlebar")
#define INFO qCInfo(lcQuickStandardTitleBar)
#define DEBUG qCDebug(lcQuickStandardTitleBar)
#define WARNING qCWarning(lcQuickStandardTitleBar)
#define CRITICAL qCCritical(lcQuickStandardTitleBar)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcQuickStandardTitleBar)
# define DEBUG qCDebug(lcQuickStandardTitleBar)
# define WARNING qCWarning(lcQuickStandardTitleBar)
# define CRITICAL qCCritical(lcQuickStandardTitleBar)
#endif
using namespace Global;

View File

@ -31,10 +31,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQuickWindowBorder, "wangwenx190.framelesshelper.quick.quickwindowborder")
#define INFO qCInfo(lcQuickWindowBorder)
#define DEBUG qCDebug(lcQuickWindowBorder)
#define WARNING qCWarning(lcQuickWindowBorder)
#define CRITICAL qCCritical(lcQuickWindowBorder)
#ifdef FRAMELESSHELPER_QUICK_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcQuickWindowBorder)
# define DEBUG qCDebug(lcQuickWindowBorder)
# define WARNING qCWarning(lcQuickWindowBorder)
# define CRITICAL qCCritical(lcQuickWindowBorder)
#endif
using namespace Global;

View File

@ -31,10 +31,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessDialog, "wangwenx190.framelesshelper.widgets.framelessdialog")
#define INFO qCInfo(lcFramelessDialog)
#define DEBUG qCDebug(lcFramelessDialog)
#define WARNING qCWarning(lcFramelessDialog)
#define CRITICAL qCCritical(lcFramelessDialog)
#ifdef FRAMELESSHELPER_WIDGETS_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessDialog)
# define DEBUG qCDebug(lcFramelessDialog)
# define WARNING qCWarning(lcFramelessDialog)
# define CRITICAL qCCritical(lcFramelessDialog)
#endif
using namespace Global;

View File

@ -40,10 +40,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcWidgetsGlobal, "wangwenx190.framelesshelper.widgets.global")
#define INFO qCInfo(lcWidgetsGlobal)
#define DEBUG qCDebug(lcWidgetsGlobal)
#define WARNING qCWarning(lcWidgetsGlobal)
#define CRITICAL qCCritical(lcWidgetsGlobal)
#ifdef FRAMELESSHELPER_WIDGETS_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcWidgetsGlobal)
# define DEBUG qCDebug(lcWidgetsGlobal)
# define WARNING qCWarning(lcWidgetsGlobal)
# define CRITICAL qCCritical(lcWidgetsGlobal)
#endif
namespace FramelessHelper::Widgets
{

View File

@ -31,10 +31,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessMainWindow, "wangwenx190.framelesshelper.widgets.framelessmainwindow")
#define INFO qCInfo(lcFramelessMainWindow)
#define DEBUG qCDebug(lcFramelessMainWindow)
#define WARNING qCWarning(lcFramelessMainWindow)
#define CRITICAL qCCritical(lcFramelessMainWindow)
#ifdef FRAMELESSHELPER_WIDGETS_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessMainWindow)
# define DEBUG qCDebug(lcFramelessMainWindow)
# define WARNING qCWarning(lcFramelessMainWindow)
# define CRITICAL qCCritical(lcFramelessMainWindow)
#endif
using namespace Global;

View File

@ -31,10 +31,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessWidget, "wangwenx190.framelesshelper.widgets.framelesswidget")
#define INFO qCInfo(lcFramelessWidget)
#define DEBUG qCDebug(lcFramelessWidget)
#define WARNING qCWarning(lcFramelessWidget)
#define CRITICAL qCCritical(lcFramelessWidget)
#ifdef FRAMELESSHELPER_WIDGETS_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessWidget)
# define DEBUG qCDebug(lcFramelessWidget)
# define WARNING qCWarning(lcFramelessWidget)
# define CRITICAL qCCritical(lcFramelessWidget)
#endif
using namespace Global;

View File

@ -44,10 +44,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcFramelessWidgetsHelper, "wangwenx190.framelesshelper.widgets.framelesswidgetshelper")
#define INFO qCInfo(lcFramelessWidgetsHelper)
#define DEBUG qCDebug(lcFramelessWidgetsHelper)
#define WARNING qCWarning(lcFramelessWidgetsHelper)
#define CRITICAL qCCritical(lcFramelessWidgetsHelper)
#ifdef FRAMELESSHELPER_WIDGETS_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcFramelessWidgetsHelper)
# define DEBUG qCDebug(lcFramelessWidgetsHelper)
# define WARNING qCWarning(lcFramelessWidgetsHelper)
# define CRITICAL qCCritical(lcFramelessWidgetsHelper)
#endif
using namespace Global;

View File

@ -33,10 +33,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcStandardSystemButton, "wangwenx190.framelesshelper.widgets.standardsystembutton")
#define INFO qCInfo(lcStandardSystemButton)
#define DEBUG qCDebug(lcStandardSystemButton)
#define WARNING qCWarning(lcStandardSystemButton)
#define CRITICAL qCCritical(lcStandardSystemButton)
#ifdef FRAMELESSHELPER_WIDGETS_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcStandardSystemButton)
# define DEBUG qCDebug(lcStandardSystemButton)
# define WARNING qCWarning(lcStandardSystemButton)
# define CRITICAL qCCritical(lcStandardSystemButton)
#endif
using namespace Global;

View File

@ -35,10 +35,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcStandardTitleBar, "wangwenx190.framelesshelper.widgets.standardtitlebar")
#define INFO qCInfo(lcStandardTitleBar)
#define DEBUG qCDebug(lcStandardTitleBar)
#define WARNING qCWarning(lcStandardTitleBar)
#define CRITICAL qCCritical(lcStandardTitleBar)
#ifdef FRAMELESSHELPER_WIDGETS_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcStandardTitleBar)
# define DEBUG qCDebug(lcStandardTitleBar)
# define WARNING qCWarning(lcStandardTitleBar)
# define CRITICAL qCCritical(lcStandardTitleBar)
#endif
using namespace Global;

View File

@ -40,10 +40,18 @@
FRAMELESSHELPER_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcWidgetsSharedHelper, "wangwenx190.framelesshelper.widgets.widgetssharedhelper")
#define INFO qCInfo(lcWidgetsSharedHelper)
#define DEBUG qCDebug(lcWidgetsSharedHelper)
#define WARNING qCWarning(lcWidgetsSharedHelper)
#define CRITICAL qCCritical(lcWidgetsSharedHelper)
#ifdef FRAMELESSHELPER_WIDGETS_NO_DEBUG_OUTPUT
# define INFO QT_NO_QDEBUG_MACRO()
# define DEBUG QT_NO_QDEBUG_MACRO()
# define WARNING QT_NO_QDEBUG_MACRO()
# define CRITICAL QT_NO_QDEBUG_MACRO()
#else
# define INFO qCInfo(lcWidgetsSharedHelper)
# define DEBUG qCDebug(lcWidgetsSharedHelper)
# define WARNING qCWarning(lcWidgetsSharedHelper)
# define CRITICAL qCCritical(lcWidgetsSharedHelper)
#endif
using namespace Global;