Go to file
Michael Weghorn 3bace699bf a11y uia: Support ISelectionProvider2
Support UIA's ISelectionProvider2 interface [1]
in addition to ISelectionProvider.

The ISelectionProvider2 interface inherits from the
ISelectionProvider interface.

A follow-up commit that will introduce bridging the
QAccessibleSelectionInterface, introduced in commit
9d16d5e224.

While at it, also reserve space for the amount
of children in the QList in QWindowsUiaSelectionProvider::GetSelection
before inserting them one by one, to avoid reallocations.

Sample use of the ISelectionProvider2 interface from NVDA's
Python console [2] with this commit in place:

1) start NVDA
2) run the gallery example (examples\widgets\gallery\gallery.exe)
3) click on the "Style" listbox at the top
4) press Numpad_insert+control+z to start the NVDA Python console and
   capture snapshot variables
5) query and use the interface using NVDA's Python console

    >>> import UIAHandler
    >>> iselection2 = focus.parent.UIAElement.GetCurrentPattern(10034).QueryInterface(UIAHandler.IUIAutomationSelectionPattern2)
    >>> iselection2.CurrentItemCount
    1
    >>> iselection2.CurrentFirstSelectedItem.CurrentName
    'windowsvista'
    >>> iselection2.CurrentLastSelectedItem.CurrentName
    'windowsvista'

[1] https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcore/nn-uiautomationcore-iselectionprovider2
[2] https://www.nvaccess.org/files/nvda/documentation/developerGuide.html#PythonConsole

Change-Id: I43642e9e39b63c65da97af976cc322a8e5868170
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-07-18 22:49:53 +02:00
.github/workflows Repair github action workflow 2021-11-10 18:57:33 +01:00
bin Add simple project generation based on existing source files 2023-02-08 12:59:19 +01:00
cmake Make Qt headers work with MSVC /W4 2023-07-18 14:48:19 +02:00
coin Doc: Move the warninglimit configuration to doc/global 2023-06-29 12:08:34 +00:00
config.tests Remove the mandatory x86-64 features from its feature list 2023-05-31 14:55:37 -07:00
dist Add Qt 6.0.0 changes file 2020-11-16 10:02:08 +02:00
doc Introduce macro.qtpolicydeprecatedbehavior for Qt CMake Policy 2023-07-10 21:47:08 +02:00
examples Network-chat example: update the screenshot 2023-07-17 18:49:16 +02:00
lib
libexec Remove syncqt.pl 2023-06-30 13:23:46 +02:00
LICENSES Clarify license of SHA-1 algorithm 2023-04-26 16:36:18 +02:00
mkspecs Fix spelling of D-Bus in the source code 2023-07-06 21:51:29 +02:00
qmake qtpaths: generate proper JSON 2023-07-08 10:50:41 +02:00
src a11y uia: Support ISelectionProvider2 2023-07-18 22:49:53 +02:00
tests tst_QAbstractItemModelTester: fix mem-leak 2023-07-18 12:13:30 +02:00
util wasm: add shared library preload scripts 2023-07-03 19:02:48 +02:00
.cmake.conf CMake: Require CMake 3.21 when building/using Qt on Apple platforms 2023-06-28 22:09:20 +02:00
.gitattributes Give batch files CRLF line endings 2020-11-04 15:02:29 +00:00
.gitignore Add CMakeUserPresets.json to .gitignore 2023-06-23 12:13:08 +02:00
.lgtm.yml Skip LGTM analysis for the bootstrap library and tools 2020-07-16 01:04:34 +02:00
.tag
CMakeLists.txt Introduce QT_ALLOW_SYMLINK_IN_PATHS flag 2023-05-03 19:44:45 +02:00
config_help.txt Disable vcpkg detection/integration by default 2023-07-12 11:24:15 +02:00
configure Retrieve an old -redo behavior 2023-02-07 18:51:58 +00:00
configure.bat Retrieve an old -redo behavior 2023-02-07 18:51:58 +00:00
configure.cmake Update the implementation of -unity-build 2023-06-29 10:20:25 +02:00
dependencies.yaml Re-add dependencies.yaml now that qt5.git wip/qt6 builds fine 2019-09-18 13:19:31 +02:00
qt_cmdline.cmake Update the implementation of -unity-build 2023-06-29 10:20:25 +02:00
sync.profile rhi: Make it a QPA-style private but semi-public API 2023-05-21 15:42:58 +02:00