summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativetextedit
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-02-03 04:59:56 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2011-02-03 05:07:00 (GMT)
commitd87e2627cbc3f818e23c9c80b03cc665e5f3d444 (patch)
tree47d94c9b7edbdb9250660757b6fc15efc8950524 /tests/auto/declarative/qdeclarativetextedit
parent663f836f58e6588a7f99849d52f8f7e6c9c81bb7 (diff)
downloadQt-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 'tests/auto/declarative/qdeclarativetextedit')
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index b82aca8..7d5101c 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -1676,6 +1676,16 @@ void tst_qdeclarativetextedit::openInputPanelOnFocus()
QApplication::processEvents();
QVERIFY(view.inputContext() == 0);
QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
+
+ // input method should not be enabled
+ // if TextEdit is read only.
+ edit.setReadOnly(true);
+ ic.openInputPanelReceived = false;
+ edit.setFocus(true);
+ QApplication::processEvents();
+ QCOMPARE(ic.openInputPanelReceived, false);
+ QVERIFY(view.inputContext() == 0);
+ QVERIFY(!view.testAttribute(Qt::WA_InputMethodEnabled));
}
void tst_qdeclarativetextedit::geometrySignals()