diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-17 17:38:37 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2009-11-17 17:38:50 (GMT) |
commit | a61adccf96a8ceefbf1150966adda3f6d226ec6d (patch) | |
tree | 7f01b588860f34b27f9c68146b603948d391bb8c /src/gui/widgets | |
parent | 334b2a93d461ae9a8b258fff1971fb775b13bb68 (diff) | |
parent | ecc202c0410125c944f156b5d0de67f093c02723 (diff) | |
download | Qt-a61adccf96a8ceefbf1150966adda3f6d226ec6d.zip Qt-a61adccf96a8ceefbf1150966adda3f6d226ec6d.tar.gz Qt-a61adccf96a8ceefbf1150966adda3f6d226ec6d.tar.bz2 |
Merge oslo-staging-2/4.6 into upstream/4.6
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qlineedit.cpp | 7 | ||||
-rw-r--r-- | src/gui/widgets/qmenu.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/qplaintextedit.cpp | 3 | ||||
-rw-r--r-- | src/gui/widgets/qtextedit.cpp | 7 |
4 files changed, 16 insertions, 4 deletions
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp index f5dbe1c..9f3fe4f 100644 --- a/src/gui/widgets/qlineedit.cpp +++ b/src/gui/widgets/qlineedit.cpp @@ -1515,7 +1515,8 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e) } #endif - d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); + if (!isReadOnly()) + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } @@ -1594,7 +1595,9 @@ void QLineEdit::keyPressEvent(QKeyEvent *event) && !isReadOnly()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN clear(); +#endif } else { event->ignore(); return; @@ -1651,7 +1654,9 @@ void QLineEdit::inputMethodEvent(QInputMethodEvent *e) && hasFocus() && !hasEditFocus() && !e->preeditString().isEmpty()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN selectAll(); // so text is replaced rather than appended to +#endif } #endif diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp index 54d1612..fc88d06 100644 --- a/src/gui/widgets/qmenu.cpp +++ b/src/gui/widgets/qmenu.cpp @@ -1106,6 +1106,7 @@ void QMenuPrivate::_q_actionTriggered() { Q_Q(QMenu); if (QAction *action = qobject_cast<QAction *>(q->sender())) { + QWeakPointer<QAction> actionGuard = action; #ifdef QT3_SUPPORT //we store it here because the action might be deleted/changed by connected slots const int id = q->findIdForAction(action); @@ -1115,7 +1116,7 @@ void QMenuPrivate::_q_actionTriggered() emit q->activated(id); #endif - if (!activationRecursionGuard) { + if (!activationRecursionGuard && actionGuard) { //in case the action has not been activated by the mouse //we check the parent hierarchy QList< QPointer<QWidget> > list; diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp index 18adc6c..c7759e8 100644 --- a/src/gui/widgets/qplaintextedit.cpp +++ b/src/gui/widgets/qplaintextedit.cpp @@ -1966,7 +1966,8 @@ void QPlainTextEdit::mouseReleaseEvent(QMouseEvent *e) d->ensureCursorVisible(); } - d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); + if (!isReadOnly()) + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index 998ab4f..1c49ef0 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -1212,7 +1212,9 @@ void QTextEdit::keyPressEvent(QKeyEvent *e) if (!hasEditFocus() && !(e->modifiers() & Qt::ControlModifier)) { if (e->text()[0].isPrint()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN clear(); +#endif } else { e->ignore(); return; @@ -1576,7 +1578,8 @@ void QTextEdit::mouseReleaseEvent(QMouseEvent *e) d->autoScrollTimer.stop(); ensureCursorVisible(); } - d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); + if (!isReadOnly()) + d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus); d->clickCausedFocus = 0; } @@ -1674,7 +1677,9 @@ void QTextEdit::inputMethodEvent(QInputMethodEvent *e) && QApplication::keypadNavigationEnabled() && !hasEditFocus()) { setEditFocus(true); +#ifndef Q_OS_SYMBIAN selectAll(); // so text is replaced rather than appended to +#endif } #endif d->sendControlEvent(e); |