diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-02-03 04:59:56 (GMT) |
---|---|---|
committer | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-02-03 05:07:00 (GMT) |
commit | d87e2627cbc3f818e23c9c80b03cc665e5f3d444 (patch) | |
tree | 47d94c9b7edbdb9250660757b6fc15efc8950524 /src | |
parent | 663f836f58e6588a7f99849d52f8f7e6c9c81bb7 (diff) | |
download | Qt-d87e2627cbc3f818e23c9c80b03cc665e5f3d444.zip Qt-d87e2627cbc3f818e23c9c80b03cc665e5f3d444.tar.gz Qt-d87e2627cbc3f818e23c9c80b03cc665e5f3d444.tar.bz2 |
Don't accept input methods when a TextEdit or TextInput is read only.
Neither would open a software input panel or allow text entry while
read only, but on Symbian at least the text input mode indicator was
still displayed giving the appearance of being able to enter text.
Task-number: QT-4497
Reviewed-by: Damian Jansen
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit.cpp | 1 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextinput.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index f63e4cb..17354eb 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -1023,6 +1023,7 @@ void QDeclarativeTextEdit::setReadOnly(bool r) if (r == isReadOnly()) return; + setFlag(QGraphicsItem::ItemAcceptsInputMethod, !r); Qt::TextInteractionFlags flags = Qt::LinksAccessibleByMouse; if (r) { diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 012d408..57e60ac 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -377,6 +377,7 @@ void QDeclarativeTextInput::setReadOnly(bool ro) if (d->control->isReadOnly() == ro) return; + setFlag(QGraphicsItem::ItemAcceptsInputMethod, !ro); d->control->setReadOnly(ro); emit readOnlyChanged(ro); |