summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/dialogs/qdialog.cpp')
-rw-r--r--src/widgets/dialogs/qdialog.cpp27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp
index 8a26e1b2a7..e8883df527 100644
--- a/src/widgets/dialogs/qdialog.cpp
+++ b/src/widgets/dialogs/qdialog.cpp
@@ -427,31 +427,6 @@ void QDialogPrivate::resetModalitySetByOpen()
resetModalityTo = -1;
}
-#if defined(Q_OS_WINCE)
-#ifdef Q_OS_WINCE_WM
-void QDialogPrivate::_q_doneAction()
-{
- //Done...
- QApplication::postEvent(q_func(), new QEvent(QEvent::OkRequest));
-}
-#endif
-
-/*!
- \reimp
-*/
-bool QDialog::event(QEvent *e)
-{
- bool result = QWidget::event(e);
-#ifdef Q_OS_WINCE
- if (e->type() == QEvent::OkRequest) {
- accept();
- result = true;
- }
-#endif
- return result;
-}
-#endif
-
/*!
In general returns the modal dialog's result code, \c Accepted or
\c Rejected.
@@ -659,12 +634,14 @@ void QDialog::contextMenuEvent(QContextMenuEvent *e)
/*! \reimp */
void QDialog::keyPressEvent(QKeyEvent *e)
{
+#ifndef QT_NO_SHORTCUT
// Calls reject() if Escape is pressed. Simulates a button
// click for the default button if Enter is pressed. Move focus
// for the arrow keys. Ignore the rest.
if (e->matches(QKeySequence::Cancel)) {
reject();
} else
+#endif
if (!e->modifiers() || (e->modifiers() & Qt::KeypadModifier && e->key() == Qt::Key_Enter)) {
switch (e->key()) {
case Qt::Key_Enter: