summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qdialog.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-04-26 17:50:28 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2010-04-27 07:51:33 (GMT)
commitf5775675df4941f5aff078f547eb34b9d9af9202 (patch)
tree21ed09f412880179685bc7b03a1b897b446484ec /src/gui/dialogs/qdialog.cpp
parent2648d5a2dc6ad4dee9ac685330b000a34339a758 (diff)
downloadQt-f5775675df4941f5aff078f547eb34b9d9af9202.zip
Qt-f5775675df4941f5aff078f547eb34b9d9af9202.tar.gz
Qt-f5775675df4941f5aff078f547eb34b9d9af9202.tar.bz2
Revert "QDialog: user-moved dialog would not show on the same place after hide"
This reverts commit 434d2312b63090cfd2ba7e0f3728b5b225bcaeec. This patch was partially wrong and introduced some unwanted effects on KDE and Windows. And it's probably not the righ solution.
Diffstat (limited to 'src/gui/dialogs/qdialog.cpp')
-rw-r--r--src/gui/dialogs/qdialog.cpp14
1 files changed, 6 insertions, 8 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.