summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2014-02-06 17:12:34 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-08 18:20:27 +0100
commit5dae375c24c99c687b8edf912100a6fffb30dd4b (patch)
tree72a3844b621000be23640b4638ace079c017f41b /src
parentba8e61a3885afb42c7ee02bf14b830df323b916a (diff)
Fix checking of category for printf-style qCDebug
Fixes an issue introduced in b8a38a6737a. We forgot to check for category validness, and printed qCDebug(c, ""...) unconditionally for compilers not supporting variadic macros. Change-Id: I779a97dacd7ea559f0d91473aad2c29e73ea2f89 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qlogging.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index dbe28da120..e3cce79baf 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -322,6 +322,8 @@ void QMessageLogger::debug(QMessageLogger::CategoryFunction catFunc,
const char *msg, ...) const
{
const QLoggingCategory &cat = (*catFunc)();
+ if (!cat.isDebugEnabled())
+ return;
QMessageLogContext ctxt;
ctxt.copy(context);