summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2012-09-27 19:18:16 -0300
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-28 10:11:00 +0200
commit72d7a833bd6cd2074f45c1ea32986d498b6dd476 (patch)
treeeda6d3057d30e732a7cd1a997da9012f04cd9410 /src/plugins/platforms/qnx
parent928fc8d93960adedc1d9598aaa71eb1f23fce108 (diff)
QNX: use assert on QQnxWindow destructor
This makes it clear that the m_childWindows size must be 0 at this point, indicating otherwise an inconsistency in the logic of the child windows management. Change-Id: I04e418bc6e1d23681bd96f4d619cde9645dc6a22 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 2d72c75178..393840e8c6 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -147,6 +147,10 @@ QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context)
QQnxWindow::~QQnxWindow()
{
qWindowDebug() << Q_FUNC_INFO << "window =" << window();
+
+ // Qt should have already deleted the children before deleting the parent.
+ Q_ASSERT(m_childWindows.size() > 0);
+
// Remove from plugin's window mapper
QQnxIntegration::removeWindow(m_window);
@@ -154,11 +158,6 @@ QQnxWindow::~QQnxWindow()
removeFromParent();
m_screen->updateHierarchy();
- // We shouldn't allow this case unless QT allows it. Does it? Or should we send the
- // handleCloseEvent on all children when this window is deleted?
- if (m_childWindows.size() > 0)
- qFatal("QQnxWindow: window destroyed before children!");
-
// Cleanup QNX window and its buffers
screen_destroy_window(m_window);
}