summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxwindow.cpp
diff options
context:
space:
mode:
authorBernd Weimer <bweimer@blackberry.com>2014-01-28 11:01:38 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-29 00:18:15 +0100
commitb709d07c340e2a6cc3d004f3edf1232b7104b38b (patch)
tree6589dc65bc111a7b22d932efad8294497ea9161e /src/plugins/platforms/qnx/qqnxwindow.cpp
parent6ab6ab73fe1055de8ce5a3b353b037424a84e187 (diff)
QNX: Cleanup some issues in QPA
* Avoided crash, if root window is reparented * Corrected video window name * Made parent window member private again Change-Id: Icef9fad5495413e0de87c4366f25dad6c4fd5775 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxwindow.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxwindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp
index 321a5ed6da..fe66d547f3 100644
--- a/src/plugins/platforms/qnx/qqnxwindow.cpp
+++ b/src/plugins/platforms/qnx/qqnxwindow.cpp
@@ -75,9 +75,9 @@ QT_BEGIN_NAMESPACE
QQnxWindow::QQnxWindow(QWindow *window, screen_context_t context, bool needRootWindow)
: QPlatformWindow(window),
m_screenContext(context),
- m_parentWindow(0),
m_window(0),
m_screen(0),
+ m_parentWindow(0),
m_visible(false),
m_exposed(true),
m_windowState(Qt::WindowNoState),
@@ -380,6 +380,11 @@ void QQnxWindow::setParent(const QPlatformWindow *window)
if (newParent == m_parentWindow)
return;
+ if (screen()->rootWindow() == this) {
+ qWarning() << "Application window cannot be reparented";
+ return;
+ }
+
removeFromParent();
m_parentWindow = newParent;