diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-01 17:09:45 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-04-07 17:21:38 +0000 |
commit | 4d17db19f895ddaa778120c346d8a6a33a710194 (patch) | |
tree | 5c931f662f4a793cb82fb5f2099f595990e25437 /examples/multimedia/video/qmlvideofx | |
parent | 9fccf8064dea35f324f822b30116828acc3855a9 (diff) |
Fix debug stream operators.
- Use QDebugStateSaver to restore space setting in stream operators
instead of returning dbg.space() which breaks formatting on streams
that already have nospace() set.
- Fix some single character string constants, streamline code.
Change-Id: I18ae7324b172ea801aa9b5fe56ddf6fe527fdde9
Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com>
Diffstat (limited to 'examples/multimedia/video/qmlvideofx')
-rw-r--r-- | examples/multimedia/video/qmlvideofx/trace.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/multimedia/video/qmlvideofx/trace.h b/examples/multimedia/video/qmlvideofx/trace.h index 86e46b33e..b251deb3d 100644 --- a/examples/multimedia/video/qmlvideofx/trace.h +++ b/examples/multimedia/video/qmlvideofx/trace.h @@ -62,8 +62,9 @@ struct PtrWrapper template <typename T> inline QDebug &operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper) { - debug.nospace() << "[" << (void*)wrapper.m_ptr << "]"; - return debug.space(); + QDebugStateSaver saver(debug); + debug.nospace() << '[' << static_cast<const void *>(wrapper.m_ptr) << ']'; + return debug; } #ifdef ENABLE_TRACE |