diff options
author | Jan-Arve Saether <jan-arve.saether@nokia.com> | 2012-08-13 15:35:44 (GMT) |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-16 14:10:43 (GMT) |
commit | 8c749cab4d457644a14698709d1c74dfa4d5ac6e (patch) | |
tree | 5ef0f063f50db9fa835b8f0de3b78ff6dfb99061 /tests/auto | |
parent | 4917daf500f0403042de35fcc17daa2d7d4f8475 (diff) | |
download | Qt-8c749cab4d457644a14698709d1c74dfa4d5ac6e.zip Qt-8c749cab4d457644a14698709d1c74dfa4d5ac6e.tar.gz Qt-8c749cab4d457644a14698709d1c74dfa4d5ac6e.tar.bz2 |
Implement QAccessibleLineEdit::characterRect()
It was probably not implemented because it needed to access
private APIs.
However, accessing those from this a11y plugin is unproblematic.
Change-Id: Icadad45a83daa60e2fbc4cab17b91c84c3f36a7f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qaccessibility/tst_qaccessibility.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp index 297e853..c42269b 100644 --- a/tests/auto/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp @@ -3150,6 +3150,16 @@ void tst_QAccessibility::lineEditTest() QCOMPARE(textIface->textAtOffset(5, QAccessible2::LineBoundary,&start,&end), cite); QCOMPARE(textIface->textAtOffset(5, QAccessible2::NoBoundary,&start,&end), cite); + + // characterRect() + le3->show(); + QTest::qWaitForWindowShown(le3); + const QRect lineEditRect = iface->rect(0); + // Only first 10 characters, check if they are within the bounds of line edit + for (int i = 0; i < 10; ++i) { + QVERIFY(lineEditRect.contains(textIface->characterRect(i, QAccessible2::RelativeToScreen))); + } + delete iface; delete toplevel; QTestAccessibility::clearEvents(); |