Add explicit QDebug stream operator for QCFString

Disambiguates between the QString and CFStringRef overloads.

Change-Id: I55a7121cd7449b4adc081f6bb7e29736e7af4442
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Tor Arne Vestbø 2019-10-02 15:37:59 +02:00
parent d1a9815a43
commit 191eb076a9
2 changed files with 7 additions and 0 deletions

View File

@ -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<QString>(string);
return debug;
}
#endif // !QT_NO_DEBUG_STREAM
#ifdef Q_OS_MACOS

View File

@ -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();