diff --git a/src/core/utils_linux.cpp b/src/core/utils_linux.cpp index 84c20eb..8884c2d 100644 --- a/src/core/utils_linux.cpp +++ b/src/core/utils_linux.cpp @@ -44,10 +44,18 @@ FRAMELESSHELPER_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(lcUtilsLinux, "wangwenx190.framelesshelper.core.utils.linux") -#define INFO qCInfo(lcUtilsLinux) -#define DEBUG qCDebug(lcUtilsLinux) -#define WARNING qCWarning(lcUtilsLinux) -#define CRITICAL qCCritical(lcUtilsLinux) + +#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(lcUtilsLinux) +# define DEBUG qCDebug(lcUtilsLinux) +# define WARNING qCWarning(lcUtilsLinux) +# define CRITICAL qCCritical(lcUtilsLinux) +#endif using namespace Global; diff --git a/src/core/utils_mac.mm b/src/core/utils_mac.mm index c572e81..691b3bb 100644 --- a/src/core/utils_mac.mm +++ b/src/core/utils_mac.mm @@ -65,10 +65,18 @@ FRAMELESSHELPER_END_NAMESPACE FRAMELESSHELPER_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(lcUtilsMac, "wangwenx190.framelesshelper.core.utils.mac") -#define INFO qCInfo(lcUtilsMac) -#define DEBUG qCDebug(lcUtilsMac) -#define WARNING qCWarning(lcUtilsMac) -#define CRITICAL qCCritical(lcUtilsMac) + +#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(lcUtilsMac) +# define DEBUG qCDebug(lcUtilsMac) +# define WARNING qCWarning(lcUtilsMac) +# define CRITICAL qCCritical(lcUtilsMac) +#endif using namespace Global;