diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-27 11:09:10 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-27 11:09:10 (GMT) |
commit | 62f952daa97d7a85d62f839bef2a3d015e7bb9e0 (patch) | |
tree | 4898b6108fe4d104ca8eef75a789aa7c3b62b53c /src | |
parent | fb101f2052d732747a4f6011379028a7039bfe3e (diff) | |
parent | f5775675df4941f5aff078f547eb34b9d9af9202 (diff) | |
download | Qt-62f952daa97d7a85d62f839bef2a3d015e7bb9e0.zip Qt-62f952daa97d7a85d62f839bef2a3d015e7bb9e0.tar.gz Qt-62f952daa97d7a85d62f839bef2a3d015e7bb9e0.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Revert "QDialog: user-moved dialog would not show on the same place after hide"
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/dialogs/qdialog.cpp | 14 | ||||
-rw-r--r-- | src/gui/dialogs/qdialog.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index e4f45ba..a6bd78a 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -393,6 +393,7 @@ void QDialogPrivate::resetModalitySetByOpen() resetModalityTo = -1; } +#if defined(Q_WS_WINCE) || defined(Q_WS_S60) #ifdef Q_WS_WINCE_WM void QDialogPrivate::_q_doneAction() { @@ -407,12 +408,12 @@ void QDialogPrivate::_q_doneAction() bool QDialog::event(QEvent *e) { bool result = QWidget::event(e); -#if defined(Q_WS_WINCE) +#ifdef Q_WS_WINCE if (e->type() == QEvent::OkRequest) { accept(); result = true; - } else -#elif defined(Q_WS_S60) + } +#else if ((e->type() == QEvent::StyleChange) || (e->type() == QEvent::Resize )) { if (!testAttribute(Qt::WA_Moved)) { Qt::WindowStates state = windowState(); @@ -421,14 +422,11 @@ bool QDialog::event(QEvent *e) if (state != windowState()) setWindowState(state); } - } else -#endif - if (e->type() == QEvent::Move) { - setAttribute(Qt::WA_Moved, true); // as explicit as the user wants it to be } - +#endif return result; } +#endif /*! Returns the modal dialog's result code, \c Accepted or \c Rejected. diff --git a/src/gui/dialogs/qdialog.h b/src/gui/dialogs/qdialog.h index 7ab0cb6..777256a 100644 --- a/src/gui/dialogs/qdialog.h +++ b/src/gui/dialogs/qdialog.h @@ -107,7 +107,9 @@ public Q_SLOTS: protected: QDialog(QDialogPrivate &, QWidget *parent, Qt::WindowFlags f = 0); +#if defined(Q_WS_WINCE) || defined(Q_WS_S60) bool event(QEvent *e); +#endif void keyPressEvent(QKeyEvent *); void closeEvent(QCloseEvent *); void showEvent(QShowEvent *); diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 441e823..b59824c 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -7307,9 +7307,9 @@ void QWidgetPrivate::show_helper() setVisible(false). - \note Since Qt 4.7, when calling hide() and then show() on QDialog - derived widgets will show on the previous (as in "Where the user moved it to") - position. + \note If you are working with QDialog or its subclasses and you invoke + the show() function after this function, the dialog will be displayed in + its original position. \sa hideEvent(), isHidden(), show(), setVisible(), isVisible(), close() */ |