Move windowsuiautomation API support into QtGui
Task-number: QTBUG-83255 Change-Id: Ibface71931b6384494842ba9744d76f738c5ca85 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
6a0995525d
commit
9c31acbf47
@ -460,6 +460,22 @@ qt_extend_target(Gui CONDITION APPLE AND QT_FEATURE_accessibility
|
||||
${FWFoundation}
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION WIN32 AND NOT WINRT AND QT_FEATURE_accessibility
|
||||
SOURCES
|
||||
accessible/windows/apisupport/qwindowsuiawrapper_p.h
|
||||
accessible/windows/apisupport/uiaattributeids_p.h
|
||||
accessible/windows/apisupport/uiacontroltypeids_p.h
|
||||
accessible/windows/apisupport/uiaerrorids_p.h
|
||||
accessible/windows/apisupport/uiaeventids_p.h
|
||||
accessible/windows/apisupport/uiageneralids_p.h
|
||||
accessible/windows/apisupport/uiaserverinterfaces_p.h
|
||||
accessible/windows/apisupport/uiaclientinterfaces_p.h
|
||||
accessible/windows/apisupport/uiapatternids_p.h
|
||||
accessible/windows/apisupport/uiapropertyids_p.h
|
||||
accessible/windows/apisupport/uiatypes_p.h
|
||||
accessible/windows/apisupport/qwindowsuiawrapper.cpp
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_action
|
||||
SOURCES
|
||||
kernel/qaction.cpp kernel/qaction.h kernel/qaction_p.h
|
||||
|
@ -22,4 +22,6 @@ qtConfig(accessibility) {
|
||||
|
||||
LIBS_PRIVATE += -framework Foundation
|
||||
}
|
||||
|
||||
win32:!winrt: include(windows/windows.pri)
|
||||
}
|
||||
|
15
src/gui/accessible/windows/apisupport/apisupport.pri
Normal file
15
src/gui/accessible/windows/apisupport/apisupport.pri
Normal file
@ -0,0 +1,15 @@
|
||||
HEADERS += \
|
||||
accessible/windows/apisupport/qwindowsuiawrapper_p.h \
|
||||
accessible/windows/apisupport/uiaattributeids_p.h \
|
||||
accessible/windows/apisupport/uiacontroltypeids_p.h \
|
||||
accessible/windows/apisupport/uiaerrorids_p.h \
|
||||
accessible/windows/apisupport/uiaeventids_p.h \
|
||||
accessible/windows/apisupport/uiageneralids_p.h \
|
||||
accessible/windows/apisupport/uiaserverinterfaces_p.h \
|
||||
accessible/windows/apisupport/uiaclientinterfaces_p.h \
|
||||
accessible/windows/apisupport/uiapatternids_p.h \
|
||||
accessible/windows/apisupport/uiapropertyids_p.h \
|
||||
accessible/windows/apisupport/uiatypes_p.h
|
||||
|
||||
SOURCES += \
|
||||
accessible/windows/apisupport/qwindowsuiawrapper.cpp
|
@ -68,7 +68,7 @@ QT_REQUIRE_CONFIG(accessibility);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QWindowsUiaWrapper
|
||||
class Q_GUI_EXPORT QWindowsUiaWrapper
|
||||
{
|
||||
QWindowsUiaWrapper();
|
||||
virtual ~QWindowsUiaWrapper();
|
1
src/gui/accessible/windows/windows.pri
Normal file
1
src/gui/accessible/windows/windows.pri
Normal file
@ -0,0 +1 @@
|
||||
include(apisupport/apisupport.pri)
|
@ -37,6 +37,3 @@ endif()
|
||||
if(QT_FEATURE_accessibility AND QT_FEATURE_accessibility_atspi_bridge)
|
||||
add_subdirectory(linuxaccessibility)
|
||||
endif()
|
||||
if(QT_FEATURE_accessibility AND WIN32 AND NOT WINRT)
|
||||
add_subdirectory(windowsuiautomation)
|
||||
endif()
|
||||
|
@ -34,7 +34,6 @@ qtConfig(accessibility) {
|
||||
SUBDIRS += linuxaccessibility
|
||||
linuxaccessibility.depends += accessibility
|
||||
}
|
||||
win32:!winrt: SUBDIRS += windowsuiautomation
|
||||
}
|
||||
|
||||
!android:linux*:qtHaveModule(dbus) \
|
||||
|
@ -1,28 +0,0 @@
|
||||
# Generated from windowsuiautomation.pro.
|
||||
|
||||
#####################################################################
|
||||
## WindowsUIAutomationSupport Module:
|
||||
#####################################################################
|
||||
|
||||
qt_add_module(WindowsUIAutomationSupport
|
||||
STATIC
|
||||
INTERNAL_MODULE
|
||||
SOURCES
|
||||
qwindowsuiawrapper.cpp qwindowsuiawrapper_p.h
|
||||
uiaattributeids_p.h
|
||||
uiaclientinterfaces_p.h
|
||||
uiacontroltypeids_p.h
|
||||
uiaerrorids_p.h
|
||||
uiaeventids_p.h
|
||||
uiageneralids_p.h
|
||||
uiapatternids_p.h
|
||||
uiapropertyids_p.h
|
||||
uiaserverinterfaces_p.h
|
||||
uiatypes_p.h
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::CorePrivate
|
||||
Qt::GuiPrivate
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 1:.:.:windowsuiautomation.pro:<TRUE>:
|
||||
# MODULE = "windowsuiautomation_support"
|
@ -1,23 +0,0 @@
|
||||
TARGET = QtWindowsUIAutomationSupport
|
||||
MODULE = windowsuiautomation_support
|
||||
|
||||
QT = core-private gui-private
|
||||
CONFIG += static internal_module
|
||||
|
||||
HEADERS += \
|
||||
qwindowsuiawrapper_p.h \
|
||||
uiaattributeids_p.h \
|
||||
uiacontroltypeids_p.h \
|
||||
uiaerrorids_p.h \
|
||||
uiaeventids_p.h \
|
||||
uiageneralids_p.h \
|
||||
uiaserverinterfaces_p.h \
|
||||
uiaclientinterfaces_p.h \
|
||||
uiapatternids_p.h \
|
||||
uiapropertyids_p.h \
|
||||
uiatypes_p.h
|
||||
|
||||
SOURCES += \
|
||||
qwindowsuiawrapper.cpp
|
||||
|
||||
load(qt_module)
|
@ -50,7 +50,7 @@
|
||||
#include <QtGui/private/qguiapplication_p.h>
|
||||
#include <QtCore/qt_windows.h>
|
||||
#include <qpa/qplatformintegration.h>
|
||||
#include <QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h>
|
||||
#include <QtGui/private/qwindowsuiawrapper_p.h>
|
||||
|
||||
#include <QtCore/private/qwinregistry_p.h>
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include <QtCore/qpointer.h>
|
||||
|
||||
#include <qwindowscombase.h>
|
||||
#include <QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h>
|
||||
#include <QtGui/private/qwindowsuiawrapper_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
#include <QtGui/qaccessible.h>
|
||||
#include <QtGui/qwindow.h>
|
||||
#include <QtCore/qrect.h>
|
||||
#include <QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h>
|
||||
#include <QtGui/private/qwindowsuiawrapper_p.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -1,6 +1,3 @@
|
||||
qtHaveModule(windowsuiautomation_support-private): \
|
||||
QT += windowsuiautomation_support-private
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/qwindowsuiaaccessibility.cpp \
|
||||
$$PWD/qwindowsuiaprovidercache.cpp \
|
||||
|
@ -12,7 +12,6 @@
|
||||
"QtDBus" => "$basedir/src/dbus",
|
||||
"QtConcurrent" => "$basedir/src/concurrent",
|
||||
"QtAccessibilitySupport" => "$basedir/src/platformsupport/accessibility",
|
||||
"QtWindowsUIAutomationSupport" => "$basedir/src/platformsupport/windowsuiautomation",
|
||||
"QtLinuxAccessibilitySupport" => "$basedir/src/platformsupport/linuxaccessibility",
|
||||
"QtDeviceDiscoverySupport" => "$basedir/src/platformsupport/devicediscovery",
|
||||
"QtEventDispatcherSupport" => "$basedir/src/platformsupport/eventdispatchers",
|
||||
|
@ -8,9 +8,6 @@ HEADERS += accessiblewidgets.h
|
||||
unix:!darwin:!haiku:!integity: LIBS += -lm
|
||||
|
||||
win32 {
|
||||
!winrt {
|
||||
QT += windowsuiautomation_support-private
|
||||
}
|
||||
LIBS += -loleacc -loleaut32
|
||||
QMAKE_USE += ole32 uuid
|
||||
}
|
||||
|
@ -32,7 +32,7 @@
|
||||
# include <QtCore/qt_windows.h>
|
||||
#ifndef Q_OS_WINRT
|
||||
# include <oleacc.h>
|
||||
# include <QtWindowsUIAutomationSupport/private/qwindowsuiawrapper_p.h>
|
||||
# include <QtGui/private/qwindowsuiawrapper_p.h>
|
||||
#endif
|
||||
# include <servprov.h>
|
||||
# include <winuser.h>
|
||||
@ -3827,8 +3827,10 @@ void tst_QAccessibility::bridgeTest()
|
||||
QVERIFY(SUCCEEDED(hr));
|
||||
|
||||
// Get UI Automation interface.
|
||||
const GUID CLSID_CUIAutomation_test{0xff48dba4, 0x60ef, 0x4201,
|
||||
{0xaa,0x87, 0x54,0x10,0x3e,0xef,0x59,0x4e}};
|
||||
IUIAutomation *automation = nullptr;
|
||||
hr = CoCreateInstance(CLSID_CUIAutomation, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&automation));
|
||||
hr = CoCreateInstance(CLSID_CUIAutomation_test, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&automation));
|
||||
QVERIFY(SUCCEEDED(hr));
|
||||
|
||||
// Get button element from UI Automation using point.
|
||||
|
@ -347,12 +347,6 @@ _qt_library_map = [
|
||||
LibraryMapping("webview", "Qt6", "Qt::WebView", extra=["COMPONENTS", "WebView"]),
|
||||
LibraryMapping("widgets", "Qt6", "Qt::Widgets", extra=["COMPONENTS", "Widgets"]),
|
||||
LibraryMapping("window-lib", "Qt6", "Qt::AppManWindow", extra=["COMPONENTS", "AppManWindow"]),
|
||||
LibraryMapping(
|
||||
"windowsuiautomation_support",
|
||||
"Qt6",
|
||||
"Qt::WindowsUIAutomationSupport",
|
||||
extra=["COMPONENTS", "WindowsUIAutomationSupport"],
|
||||
),
|
||||
LibraryMapping("winextras", "Qt6", "Qt::WinExtras", extra=["COMPONENTS", "WinExtras"]),
|
||||
LibraryMapping("x11extras", "Qt6", "Qt::X11Extras", extra=["COMPONENTS", "X11Extras"]),
|
||||
LibraryMapping("xcb_qpa_lib", "Qt6", "Qt::XcbQpa", extra=["COMPONENTS", "XcbQpa"]),
|
||||
|
Loading…
Reference in New Issue
Block a user