summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2010-04-20 07:31:58 (GMT)
committerJason Barron <jbarron@trolltech.com>2010-04-21 07:40:56 (GMT)
commite4c54b84057e55b475cc03cbfcc289e63b01e35f (patch)
treeb30fd1abd7580f4c426778cab7f5c8fd6419d22c /src/gui/kernel
parentb2c6e4d666dba9c068a0052ba018b0438f72eede (diff)
downloadQt-e4c54b84057e55b475cc03cbfcc289e63b01e35f.zip
Qt-e4c54b84057e55b475cc03cbfcc289e63b01e35f.tar.gz
Qt-e4c54b84057e55b475cc03cbfcc289e63b01e35f.tar.bz2
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')
-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 bfa7050..690fb8d 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();