diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-18 12:39:40 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-18 12:39:40 (GMT) |
commit | d46da3a141ad05c9f7cd7ea94e254980748329da (patch) | |
tree | 72beadfabcf66d725b10bbc5ce3d8c38137ed888 /src/gui/widgets | |
parent | 62e641691b9a3eadc8b9fb2e31150cdf5b66115d (diff) | |
parent | 6f6b2ab07c0dbd0ebdb25f1fbe537ea12bdffee4 (diff) | |
download | Qt-d46da3a141ad05c9f7cd7ea94e254980748329da.zip Qt-d46da3a141ad05c9f7cd7ea94e254980748329da.tar.gz Qt-d46da3a141ad05c9f7cd7ea94e254980748329da.tar.bz2 |
Merge remote branch 'mainline/4.6' into 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); |