From 35f6f530bfa3877dfdf763ab1cdb1d63cc66c6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 24 Jan 2018 15:42:17 +0100 Subject: iOS: Simplify logging of QUIView/QIOSWindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioswindow.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/plugins/platforms/ios/qioswindow.mm') 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(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 -- cgit v1.2.3