diff options
author | Janne Anttila <janne.anttila@digia.com> | 2010-03-10 13:56:25 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2010-03-10 13:57:40 (GMT) |
commit | 6d44daddab9f36fd8c34bb3776c0fb0d93635e6e (patch) | |
tree | 62108a82979bdf09cb9b5bd48423edfab3965dfc /src/gui/dialogs | |
parent | 28fc7434e0be95527292050bc6dd3980aabd44ca (diff) | |
download | Qt-6d44daddab9f36fd8c34bb3776c0fb0d93635e6e.zip Qt-6d44daddab9f36fd8c34bb3776c0fb0d93635e6e.tar.gz Qt-6d44daddab9f36fd8c34bb3776c0fb0d93635e6e.tar.bz2 |
Fixed dialog resize not to move the dialog for Symbian.
QDialog::resize() also moved the dialog in Symbian. This occured since
adjustPosition was called as an result of resize and that method did
not check if dialog position was explicitly set.
In addition it was found that in Symbian WA_Resized and WA_Moved
attributes were basically set for almost all top-level widgets
by system. This was also fixed and a new auto test was introduced
to verify these attributes in all platforms. Windows platform also
suffers from bug in this area, and a separate task QTBUG-5897 for
it was created
Task-number: QTBUG-5897
Reviewed-by: Sami Merila
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qdialog.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index d86d63e..d8ac9a8 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -415,8 +415,15 @@ bool QDialog::event(QEvent *e) result = true; } #else - if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) - adjustPosition(parentWidget()); + if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) { + if (!testAttribute(Qt::WA_Moved)) { + Qt::WindowStates state = windowState(); + adjustPosition(parentWidget()); + setAttribute(Qt::WA_Moved, false); // not really an explicit position + if (state != windowState()) + setWindowState(state); + } + } #endif return result; } |