From 47c2015beb75693c7181fb7359a4aa166e926fe7 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 29 Jun 2017 07:27:51 +0900 Subject: Fixed building with Qt version=5.4; moved away a macro unused in headers --- logging.cpp | 7 +++++++ logging.h | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/logging.cpp b/logging.cpp index 97540dd4..7476781f 100644 --- a/logging.cpp +++ b/logging.cpp @@ -18,6 +18,13 @@ #include "logging.h" +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) +#define LOGGING_CATEGORY(Name, Id) Q_LOGGING_CATEGORY((Name), (Id), QtInfoMsg) +#else +#define LOGGING_CATEGORY(Name, Id) Q_LOGGING_CATEGORY((Name), (Id)) +#endif + +// Use LOGGING_CATEGORY instead of Q_LOGGING_CATEGORY in the rest of the code LOGGING_CATEGORY(MAIN, "libqmatrixclient.main") LOGGING_CATEGORY(PROFILER, "libqmatrixclient.profiler") LOGGING_CATEGORY(EVENTS, "libqmatrixclient.events") diff --git a/logging.h b/logging.h index a769568c..e2a4c9a7 100644 --- a/logging.h +++ b/logging.h @@ -27,13 +27,6 @@ Q_DECLARE_LOGGING_CATEGORY(EPHEMERAL) Q_DECLARE_LOGGING_CATEGORY(JOBS) Q_DECLARE_LOGGING_CATEGORY(SYNCJOB) -// Use LOGGING_CATEGORY instead of Q_LOGGING_CATEGORY in the rest of the code -#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) -#define LOGGING_CATEGORY(Name, Id) Q_LOGGING_CATEGORY((Name), (Id), QtInfoMsg) -#else -#define LOGGING_CATEGORY(Name, Id) Q_LOGGING_CATEGORY((Name), (Id)) -#endif - namespace QMatrixClient { // QDebug manipulators -- cgit v1.2.3