Skip to content
This repository has been archived by the owner on Dec 19, 2023. It is now read-only.

Commit

Permalink
linux & macos: add missing code
Browse files Browse the repository at this point in the history
Signed-off-by: Yuhang Zhao <[email protected]>
  • Loading branch information
wangwenx190 committed Nov 11, 2022
1 parent 0277804 commit 766c1e1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
16 changes: 12 additions & 4 deletions src/core/utils_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
16 changes: 12 additions & 4 deletions src/core/utils_mac.mm
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,18 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
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;

Expand Down

0 comments on commit 766c1e1

Please sign in to comment.