diff options
author | José Millán Soto <fid@gpul.org> | 2012-02-07 11:53:31 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-08 07:48:46 +0100 |
commit | 4c9266fd16304f78e8759dc4c10e60b782f13f56 (patch) | |
tree | d604f25dae3eeaeb2b2e910ce761ebb8ef922d69 /tests/auto | |
parent | 6b807a283cace845c235c24543a071e41cee0dac (diff) |
Make copy and cut methods work in QAccessibleTextEdit
Correct the implementation of cutText and copyText in QAccessibleTextEdit so
they use cut() and copy() methods of QTextEdit
Cherry picked from Qt 4 - 36202cf8fca822492615d418bd563a40bee4af08
Change-Id: I86a531ed7059b1a928cb8515c2743d4d8b596b36
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/other/qaccessibility/tst_qaccessibility.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp index eb76202e35..63770f14cb 100644 --- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp +++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp @@ -1516,6 +1516,12 @@ void tst_QAccessibility::textEditTest() QCOMPARE(iface->textInterface()->characterRect(0, QAccessible2::RelativeToParent).size(), QSize(fm.width("h"), fm.height())); QCOMPARE(iface->textInterface()->characterRect(5, QAccessible2::RelativeToParent).size(), QSize(fm.width(" "), fm.height())); QCOMPARE(iface->textInterface()->characterRect(6, QAccessible2::RelativeToParent).size(), QSize(fm.width("w"), fm.height())); + + iface->editableTextInterface()->copyText(6, 11); + QCOMPARE(QApplication::clipboard()->text(), QLatin1String("world")); + iface->editableTextInterface()->cutText(12, 16); + QCOMPARE(QApplication::clipboard()->text(), QLatin1String("how ")); + QCOMPARE(iface->textInterface()->text(12, 15), QLatin1String("are")); } QTestAccessibility::clearEvents(); } |