summaryrefslogtreecommitdiffstats
path: root/tests/auto/qaccessibility
diff options
context:
space:
mode:
authorJosé Millán Soto <fid@gpul.org>2012-01-20 11:35:15 (GMT)
committerQt by Nokia <qt-info@nokia.com>2012-02-06 03:53:42 (GMT)
commit36202cf8fca822492615d418bd563a40bee4af08 (patch)
tree40a5db471e7835ed24bca02ebffb3c61aa4c27b8 /tests/auto/qaccessibility
parent827f7db3d99c17e66ccccef578060a9feed66312 (diff)
downloadQt-36202cf8fca822492615d418bd563a40bee4af08.zip
Qt-36202cf8fca822492615d418bd563a40bee4af08.tar.gz
Qt-36202cf8fca822492615d418bd563a40bee4af08.tar.bz2
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 Change-Id: I86a531ed7059b1a928cb8515c2743d4d8b596b36 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'tests/auto/qaccessibility')
-rw-r--r--tests/auto/qaccessibility/tst_qaccessibility.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/qaccessibility/tst_qaccessibility.cpp b/tests/auto/qaccessibility/tst_qaccessibility.cpp
index 1b35349..d09e796 100644
--- a/tests/auto/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/qaccessibility/tst_qaccessibility.cpp
@@ -2740,6 +2740,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();
}