summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorRafael Roquetto <rafael.roquetto.qnx@kdab.com>2012-09-28 12:24:24 (GMT)
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-30 05:02:24 (GMT)
commit5267c575d60b9f1f0415e8affbd38c28c4cd3873 (patch)
treefc9adfad32d7066998a564402fdd1ca0c1b76280 /src/plugins
parent858ede74e21ef20af4b2b95ec31e6deb18254ad9 (diff)
downloadQt-5267c575d60b9f1f0415e8affbd38c28c4cd3873.zip
Qt-5267c575d60b9f1f0415e8affbd38c28c4cd3873.tar.gz
Qt-5267c575d60b9f1f0415e8affbd38c28c4cd3873.tar.bz2
QNX: use assert on QBBWindow destructor
This makes it clear that the mChildren size must be 0 at this point, indicating otherwise an inconsistency in the logic of the child windows management. cherry-picked from qt5 72d7a833bd6cd2074f45c1ea32986d498b6dd476 Change-Id: I7c0eb9b1b1121b708badb46bd423de0e75d206a6 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/blackberry/qbbwindow.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/platforms/blackberry/qbbwindow.cpp b/src/plugins/platforms/blackberry/qbbwindow.cpp
index 04b5ce0..ff66534 100644
--- a/src/plugins/platforms/blackberry/qbbwindow.cpp
+++ b/src/plugins/platforms/blackberry/qbbwindow.cpp
@@ -138,15 +138,13 @@ QBBWindow::~QBBWindow()
qDebug() << "QBBWindow::~QBBWindow - w=" << widget();
#endif
+ // Qt should have already deleted the children before deleting the parent.
+ Q_ASSERT(mChildren.size() == 0);
+
// Remove from parent's Hierarchy.
removeFromParent();
mScreen->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 (mChildren.size() > 0)
- qFatal("QBBWindow: window destroyed before children!");
-
// cleanup OpenGL/OpenVG context if it exists
if (mPlatformGlContext != NULL) {
delete mPlatformGlContext;