QDebug: Print more verbose NSObject output if requested

Change-Id: Ia4f4f62675a2c2e63e36c5fbf6d869e0ab8e1a9f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
Tor Arne Vestbø 2017-07-12 15:05:36 +02:00
parent e108620e11
commit 545458cb77

View File

@ -52,7 +52,11 @@ QT_BEGIN_NAMESPACE
QDebug operator<<(QDebug dbg, const NSObject *nsObject)
{
return dbg << (nsObject ? nsObject.description.UTF8String : "NSObject(0x0)");
return dbg << (nsObject ?
dbg.verbosity() > 2 ?
nsObject.debugDescription.UTF8String :
nsObject.description.UTF8String
: "NSObject(0x0)");
}
QDebug operator<<(QDebug dbg, CFStringRef stringRef)