Always instantiate QPlatformAccessibility
Instead of returning 0, instantiate QPlatformAccessibility which delegates the handling of accessibilty to accessibilitybridge plugins. This makes it possible to implement entirely custom handling of the accessibility events, making it possible to write for example in-process screen readers. Change-Id: I7bcfd83b769af8ca2689fb38add1345719cf804f Reviewed-by: Jesus Fernandez <jesus.fernandez@qt.io> Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>bb10
parent
d90c234bac
commit
b1dc0841fe
|
|
@ -354,11 +354,16 @@ QPlatformInputContext *QPlatformIntegration::inputContext() const
|
|||
/*!
|
||||
Returns the platforms accessibility.
|
||||
|
||||
The default implementation returns 0, implying no accessibility support.
|
||||
The default implementation returns QPlatformAccessibility which
|
||||
delegates handling of accessibility to accessiblebridge plugins.
|
||||
*/
|
||||
QPlatformAccessibility *QPlatformIntegration::accessibility() const
|
||||
{
|
||||
return 0;
|
||||
static QPlatformAccessibility *accessibility = 0;
|
||||
if (Q_UNLIKELY(!accessibility)) {
|
||||
accessibility = new QPlatformAccessibility;
|
||||
}
|
||||
return accessibility;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue