summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qioswindow.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-01-24 15:42:17 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2018-02-05 16:27:57 +0000
commit35f6f530bfa3877dfdf763ab1cdb1d63cc66c6d2 (patch)
treebb604cadf817db33602c7058e21cd6427a6a486f /src/plugins/platforms/ios/qioswindow.mm
parent6197df32ec3449ec141bcd9fa4fe47da4cc761e7 (diff)
iOS: Simplify logging of QUIView/QIOSWindow
Automatically printing the relationship between the view, platform window, and window, makes it easier to track each object across events. Change-Id: I9fbfaa5c304849ed99dba3b5cd8e7449105d0307 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/ios/qioswindow.mm')
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index 38136c05db..6ee258e363 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -381,6 +381,19 @@ CAEAGLLayer *QIOSWindow::eaglLayer() const
return static_cast<CAEAGLLayer *>(m_view.layer);
}
+#ifndef QT_NO_DEBUG_STREAM
+QDebug operator<<(QDebug debug, const QIOSWindow *window)
+{
+ QDebugStateSaver saver(debug);
+ debug.nospace();
+ debug << "QIOSWindow(" << (const void *)window;
+ if (window)
+ debug << ", window=" << window->window();
+ debug << ')';
+ return debug;
+}
+#endif // !QT_NO_DEBUG_STREAM
+
#include "moc_qioswindow.cpp"
QT_END_NAMESPACE