Fix checking of category for printf-style qCDebug
Fixes an issue introduced in b8a38a6737. 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>
bb10
parent
ba8e61a388
commit
5dae375c24
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue