Skip to content

Commit

Permalink
Always instantiate QPlatformAccessibility
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Jan Arve Sæther <[email protected]>
  • Loading branch information
gladhorn committed Jan 4, 2017
1 parent d90c234 commit b1dc084
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/gui/kernel/qplatformintegration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1dc084

Please sign in to comment.