From 25588ae68c47c2e684964982c135c15fcb2fc83c Mon Sep 17 00:00:00 2001 From: banad60 <44313677+banad60@users.noreply.github.com> Date: Sat, 20 Oct 2018 10:06:04 +0200 Subject: [PATCH] Fixes for LP Bug #1797746 / noquote for QT5 Fix for https://bugs.launchpad.net/mixxx/+bug/1797746 Without this patch, debugging messages in mixxx.log are quoted since QT > 5.4, which breaks output of engine.log() escape characters. This patch adds .noquote() to QDebug if QT_VERSION >= 5.4 --- src/controllers/controllerdebug.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/controllers/controllerdebug.h b/src/controllers/controllerdebug.h index 5df06021b488..68230abe8d32 100644 --- a/src/controllers/controllerdebug.h +++ b/src/controllers/controllerdebug.h @@ -30,10 +30,17 @@ class ControllerDebug { // We prefix every log message with Logging::kControllerDebugPrefix so that we // can bypass the --logLevel commandline argument when --controllerDebug is // specified. +// +// In order of Bug #1797746, since transition to qt5 it is needed unquote the +// output for mixxx.log with .noquote(), because in qt5 QDebug() is quoted by default. #define controllerDebug(stream) \ { \ if (ControllerDebug::enabled()) { \ +#if QT_VERSION > 0x050399 + QDebug(QtDebugMsg).noquote() << ControllerDebug::kLogMessagePrefix << stream; \ +#else QDebug(QtDebugMsg) << ControllerDebug::kLogMessagePrefix << stream; \ +#endif } \ } \