Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.5
-
None
-
Debian testing, qtbase built from dev branch as of commit e8495fc86e81f79aac5837b261e8395133c13631
-
-
9ab11c726e (qt/qtbase/dev) 9ab11c726e (qt/tqtc-qtbase/dev)
Description
Besides "GetTextAtOffset", the AT-SPI text interface also has a similar method "GetStringAtOffset" (added in https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/56220f05bc8b7683911658e1a8aff4a1ab3cab8d ), which is apparently meant to be the "successor", since the use of "GetTextAtOffset" by clients has been deprecated along with the commit.
However, Qt currently doesn't support it.
Steps to reproduce:
(s.a. QTBUG-105281 for a somewhat similar scenario that also includes a screencast)
1) start Accerciser (https://wiki.gnome.org/Apps/Accerciser)
2) build and run the "textedit" example from qtbase:
$ qtbase/examples/widgets/richtext/textedit/textedit
3) navigate to the example's text node in Accerciser's a11y treeview of the application
4) call the corresponding method on the text interface
In [70]: acc.queryText().getStringAtOffset(5, pyatspi.TEXT_GRANULARITY_WORD)
Actual result:
An error message is shown:
In [70]: acc.queryText().getStringAtOffset(5, pyatspi.TEXT_GRANULARITY_WORD) --------------------------------------------------------------------------- Error Traceback (most recent call last) /usr/lib/python3/dist-packages/pyatspi/__init__.py in <module> ----> 1 acc.queryText().getStringAtOffset(5, pyatspi.TEXT_GRANULARITY_WORD) /usr/lib/python3/dist-packages/pyatspi/text.py in getStringAtOffset(self, offset, type) 523 the object, delimited by the specified text granularity. 524 """ --> 525 ret = Atspi.Text.get_string_at_offset(self.obj, offset, type) 526 return textRangeToList(ret) 527 Error: atspi_error: No such object path '/org/a11y/atspi/accessible/2147483675' (1)
Expected result:
No error, but essentially the same result as one gets when using the "GetTextAtOffset" method with a matching boundary type instead:
In [71]: acc.queryText().getTextAtOffset(5, pyatspi.TEXT_BOUNDARY_WORD_START)
Out[71]: ('DOCTYPE', 2, 9)
Attachments
For Gerrit Dashboard: QTBUG-105811 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
427544,3 | a11y atspi: Support text interface's GetStringAtOffset | dev | qt/qtbase | Status: MERGED | +2 | 0 |