From 191eb076a9b3f54b50d8c6d50039c59c03ae0483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 2 Oct 2019 15:37:59 +0200 Subject: [PATCH] Add explicit QDebug stream operator for QCFString Disambiguates between the QString and CFStringRef overloads. Change-Id: I55a7121cd7449b4adc081f6bb7e29736e7af4442 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qcore_mac_objc.mm | 6 ++++++ src/corelib/kernel/qcore_mac_p.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/corelib/kernel/qcore_mac_objc.mm b/src/corelib/kernel/qcore_mac_objc.mm index 9e9e71c397..b1f3b74cd4 100644 --- a/src/corelib/kernel/qcore_mac_objc.mm +++ b/src/corelib/kernel/qcore_mac_objc.mm @@ -211,6 +211,12 @@ QDebug operator<<(QDebug debug, const QMacAutoReleasePool *pool) debug << "QMacAutoReleasePool(" << (const void *)pool << ')'; return debug; } + +QDebug operator<<(QDebug debug, const QCFString &string) +{ + debug << static_cast(string); + return debug; +} #endif // !QT_NO_DEBUG_STREAM #ifdef Q_OS_MACOS diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h index 270b8fcf0f..d03e2f3738 100644 --- a/src/corelib/kernel/qcore_mac_p.h +++ b/src/corelib/kernel/qcore_mac_p.h @@ -169,6 +169,7 @@ Q_CORE_EXPORT bool qt_mac_applicationIsInDarkMode(); #ifndef QT_NO_DEBUG_STREAM Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QMacAutoReleasePool *pool); +Q_CORE_EXPORT QDebug operator<<(QDebug debug, const QCFString &string); #endif Q_CORE_EXPORT bool qt_apple_isApplicationExtension();