diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2015-09-02 16:22:41 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2015-09-03 19:25:09 +0000 |
commit | 9129d2714a5e9b1ca86cf7911edee90ee13493d8 (patch) | |
tree | 7a7b36ff7ab068eba6907eb0b161c053a25e86a8 /src/corelib/tools/qsharedpointer.cpp | |
parent | 4116fe873eae7b541d485215ce46d9224af49701 (diff) |
Implement QDebug support for QSharedPointer
... otherwise the type goes through operator bool() and prints
"true" or "false" (!).
[ChangeLog][QtCore][QSharedPointer] Added support for debug
printing via QDebug.
Change-Id: Ic3ef9b9feee8d6ca08f1dd69f20f421fea20ca00
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qsharedpointer.cpp')
-rw-r--r-- | src/corelib/tools/qsharedpointer.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp index 86f4c6a268..4d30396cb6 100644 --- a/src/corelib/tools/qsharedpointer.cpp +++ b/src/corelib/tools/qsharedpointer.cpp @@ -1292,6 +1292,17 @@ compile. Use qSharedPointerConstCast to cast away the constness. */ +/*! + \fn QDebug operator<<(QDebug debug, const QSharedPointer<T> &ptr) + \relates QSharedPointer + \since 5.7 + + Writes the pointer tracked by \a ptr into the debug object \a debug for + debugging purposes. + + \sa {Debugging Techniques} +*/ + #include <qset.h> #include <qmutex.h> |