summaryrefslogtreecommitdiff
path: root/src/gui/kernel/qwidget_s60.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2010-04-20 09:31:58 +0200
committerJason Barron <jbarron@trolltech.com>2010-04-21 09:40:56 +0200
commite4c54b84057e55b475cc03cbfcc289e63b01e35f (patch)
treeb30fd1abd7580f4c426778cab7f5c8fd6419d22c /src/gui/kernel/qwidget_s60.cpp
parentb2c6e4d666dba9c068a0052ba018b0438f72eede (diff)
downloadqt4-tools-e4c54b84057e55b475cc03cbfcc289e63b01e35f.tar.gz
Modify setWindowState() on Symbian to create the native window earlier.
The native window is used quite early in this function so as soon as we determine that this does in fact require a native window, we should create it immediately. Reviewed-by: Janne Anttila
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index bfa7050b4a..690fb8d319 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1063,6 +1063,9 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
return;
if (isWindow()) {
+ createWinId();
+ Q_ASSERT(testAttribute(Qt::WA_WState_Created));
+
const bool wasResized = testAttribute(Qt::WA_Resized);
const bool wasMoved = testAttribute(Qt::WA_Moved);
@@ -1100,8 +1103,6 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
}
#endif // Q_WS_S60
- createWinId();
- Q_ASSERT(testAttribute(Qt::WA_WState_Created));
// Ensure the initial size is valid, since we store it as normalGeometry below.
if (!wasResized && !isVisible())
adjustSize();