summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas McGuire <thomas.mcguire.qnx@kdab.com>2012-07-16 08:04:52 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-07-16 11:26:34 (GMT)
commitba93b6a3401d726e8ba0bca82c144c13406d56a6 (patch)
tree1fb062706ec5359320e0148e763628070ca6cf9d
parent4dee44e0960108751d202dd6b4d8d26b336b7576 (diff)
downloadQt-ba93b6a3401d726e8ba0bca82c144c13406d56a6.zip
Qt-ba93b6a3401d726e8ba0bca82c144c13406d56a6.tar.gz
Qt-ba93b6a3401d726e8ba0bca82c144c13406d56a6.tar.bz2
Blackberry: Apply state from QWidget when creating new QBBWindow
Otherwise things like the window position and the parent/child relation were wrong. This is a backport from qtbase commit 095f2d5292ddfb4c77056af89c11327d85af282b. Change-Id: I838a15def49c004d0a0229f208ffa8e4f7aa5216 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
-rw-r--r--src/plugins/platforms/blackberry/qbbwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/platforms/blackberry/qbbwindow.cpp b/src/plugins/platforms/blackberry/qbbwindow.cpp
index 515b6c2..c57c556 100644
--- a/src/plugins/platforms/blackberry/qbbwindow.cpp
+++ b/src/plugins/platforms/blackberry/qbbwindow.cpp
@@ -121,6 +121,13 @@ QBBWindow::QBBWindow(QWidget *window, screen_context_t context, QBBScreen *scree
// Set the screen to the primary display (this is the default specified by screen).
setScreen(screen);
+
+ // Qt somtimes doesn't call these setters after creating the window, so we need to do that
+ // ourselves here
+ if (window->parentWidget())
+ setParent(window->parentWidget()->platformWindow());
+ setGeometry(window->geometry());
+ setVisible(window->isVisible());
}
QBBWindow::~QBBWindow()