summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/uiautomation/qwindowsuiatextprovider.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace QWindowsComBase with QComObjectPavel Dubsky2024-02-271-14/+0
| | | | | | | | | | | | Currently with have two base classes for COM-objects that implement basic IUnknown functionality and the idea is to remove duplication and keep just one. Since QComObject supports more features than QWindowsComBase, such as multiple inheritance and intermediate interface querying, we should switch to the former one. Change-Id: Ief6567496de9f547b936de91d634c6998ba59a75 Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* a11y uia: Don't return "S_OK" and null text rangeMichael Weghorn2023-08-301-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QWindowsUiaTextProvider::RangeFromPoint was called with a point that is not over any character, it was previously returning S_OK and a nullptr for the text range. This is contrary to what the ITextProvider::RangeFromPoint documentation [1] says: > If this method succeeds, it returns S_OK. > Otherwise, it returns an HRESULT error code. and > The property never returns NULL. Therefore, setting pRetVal to NULL and returning S_OK at the same time is problematic. Return UIA_E_ELEMENTNOTAVAILABLE instead for that case, and only return S_OK when actually setting a valid text range provider as well. Ideally, this should return an empty range for the character that is closest to the given point. That one could be identified by iterating over all characters and calculating their distance to the given point, but that would be too expensive. [1] https://learn.microsoft.com/en-us/windows/win32/api/uiautomationcore/nf-uiautomationcore-itextprovider-rangefrompoint Fixes: QTBUG-115801 Pick-to: 6.6 6.5 Change-Id: Ib08d02677935a45517c937613785f1e3f53ee032 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Windows QPA: Fix clang warnings about repetitive type namesFriedemann Kleint2019-06-131-3/+3
| | | | | | | | | | Fix warning like: warning: use auto when initializing with new/reinterpret_cast to avoid duplicating the type name [modernize-use-auto] Change-Id: Ieb7f052919173f6923e68de9f9e849dee45e36e7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Fix minor stuff in Windows UI Automation supportAndre de la Rocha2018-06-271-4/+4
| | | | | | | | | Adding missing "override" keywords in overridden interfaces, using "#if QT_CONFIG(accessibility)" instead of "#ifndef QT_NO_ACCESSIBILITY", and other minor bits. No change in behavior expected. Change-Id: Ief0e23cb7b577dd3e4af21750b6beccc80d6a2f8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows QPA: Fix Qt include statementsFriedemann Kleint2018-05-231-5/+4
| | | | | | | | | | | | Change #include <QtCore/QDebug> to #include <QtCore/qdebug.h> according to the coding style. Change-Id: I6ba8a7424c548ddde1d18f3f6f4f87e30973d710 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add support for Windows UI AutomationAndre de la Rocha2017-11-141-0/+261
Replaces the Qt Accessibility Windows back end, formerly based on legacy MSAA, with a new implementation based on UI Automation. Fixes issues with accessibility tools like screen readers and magnifiers, and with the automatic showing and hiding of the virtual keyboard in touchscreen-based Windows computers. [ChangeLog][Windows] The Windows Accessibility back end, formerly based on Microsoft Active Accessibility, was replaced with a new implementation based on Microsoft UI Automation. Task-number: QTPM-487 Task-number: QTBUG-53024 Task-number: QTBUG-43190 Task-number: QTBUG-61926 Task-number: QTBUG-38499 Task-number: QTBUG-38337 Task-number: QTBUG-38501 Task-number: QTBUG-38502 Task-number: QTBUG-38504 Task-number: QTBUG-38505 Task-number: QTBUG-38507 Change-Id: I20b4f8f5e938fef791c6e9c577fcd919140999bd Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>