Fix QAccessible to build when QT_NO_ACCESSIBILITY is defined
Change-Id: I6104633cdc80425b8f4697acd28c9a156cd0d76f Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>bb10
parent
1dd9586a71
commit
f306ebc042
|
|
@ -434,19 +434,23 @@ QAccessible::RootObjectHandler QAccessible::rootObjectHandler = 0;
|
|||
static bool accessibility_active = false;
|
||||
static bool cleanupAdded = false;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
static QPlatformAccessibility *platformAccessibility()
|
||||
{
|
||||
QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration();
|
||||
return pfIntegration ? pfIntegration->accessibility() : 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
void QAccessible::cleanup()
|
||||
{
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
|
||||
pfAccessibility->cleanup();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void qAccessibleCleanup()
|
||||
|
|
@ -588,8 +592,10 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
|
|||
mo = mo->superClass();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
if (object == qApp)
|
||||
return new QAccessibleApplication;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -629,8 +635,10 @@ void QAccessible::setRootObject(QObject *object)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
|
||||
pfAccessibility->setRootObject(object);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -662,8 +670,10 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
|
|||
if (!isActive())
|
||||
return;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
|
||||
pfAccessibility->notifyAccessibilityUpdate(event);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Reference in New Issue