1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-14 10:24:19 +01:00

Fix release compilation error because of qt_no_debug_output flag

This commit is contained in:
Chocobozzz 2015-06-11 11:35:30 +02:00
parent cc079eceda
commit 4943bca877
2 changed files with 36 additions and 1 deletions

View File

@ -140,6 +140,7 @@ find_package(Threads)
if(${CMAKE_BUILD_TYPE} MATCHES "Release")
add_definitions(-DNDEBUG)
add_definitions(-DQT_NO_DEBUG_OUTPUT)
add_definitions(-DQT_NO_WARNING_OUTPUT)
endif(${CMAKE_BUILD_TYPE} MATCHES "Release")
# Set up definitions and paths

View File

@ -27,10 +27,44 @@
#define qLog(level) \
while (false) QNoDebug()
#else
#define qLog(level) \
#define qLog(level) \
qLog##level()
#define qCreateLogger(level) \
logging::CreateLogger(logging::Level_##level, \
logging::ParsePrettyFunction(__PRETTY_FUNCTION__), \
__LINE__)
#define qLogFatal() \
qCreateLogger(Fatal)
#define qLogError() \
qCreateLogger(Error)
#ifdef QT_NO_WARNING_OUTPUT
#define qLogWarning() \
while (false) QNoDebug()
#else
#define qLogWarning() \
qCreateLogger(Warning)
#endif
#ifdef QT_NO_DEBUG_OUTPUT
#define qLogInfo() \
while (false) QNoDebug()
#define qLogDebug() \
while (false) QNoDebug()
#else
#define qLogInfo() \
qCreateLogger(Info)
#define qLogDebug() \
qCreateLogger(Debug)
#endif
#endif
namespace logging {