summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible/qaccessible.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2014-07-02 14:10:30 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2014-08-21 15:17:56 +0200
commit4cceceff155a6d43cb0ac312d3055390cfc75201 (patch)
treedee11b79ec5f69a1a627280c918ec728a85b6880 /src/gui/accessible/qaccessible.cpp
parentd807a16e7f9555e02991fc86ac5085ebe0101ef3 (diff)
Compile with -no-feature-accessibility
Task-number: QTBUG-38045 Change-Id: Id436b70aa6161bdf2428ca0a605212b278c71849 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'src/gui/accessible/qaccessible.cpp')
-rw-r--r--src/gui/accessible/qaccessible.cpp22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index c01834a744..f9fbc92d20 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -462,14 +462,13 @@ QT_BEGIN_NAMESPACE
Synonym for unsigned, used by the QAccessibleInterface cache.
*/
+#ifndef QT_NO_ACCESSIBILITY
/* accessible widgets plugin discovery stuff */
-#ifndef QT_NO_ACCESSIBILITY
#ifndef QT_NO_LIBRARY
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QAccessibleFactoryInterface_iid, QLatin1String("/accessible")))
#endif
-#endif
// FIXME turn this into one global static struct
Q_GLOBAL_STATIC(QList<QAccessible::InterfaceFactory>, qAccessibleFactories)
@@ -482,13 +481,11 @@ QAccessible::RootObjectHandler QAccessible::rootObjectHandler = 0;
static bool cleanupAdded = false;
-#ifndef QT_NO_ACCESSIBILITY
static QPlatformAccessibility *platformAccessibility()
{
QPlatformIntegration *pfIntegration = QGuiApplicationPrivate::platformIntegration();
return pfIntegration ? pfIntegration->accessibility() : 0;
}
-#endif
/*!
\fn QAccessible::QAccessible()
@@ -504,10 +501,8 @@ static QPlatformAccessibility *platformAccessibility()
*/
void QAccessible::cleanup()
{
-#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->cleanup();
-#endif
}
static void qAccessibleCleanup()
@@ -691,7 +686,6 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
return iface;
}
}
-#ifndef QT_NO_ACCESSIBILITY
#ifndef QT_NO_LIBRARY
// Find a QAccessiblePlugin (factory) for the class name. If there's
// no entry in the cache try to create it using the plugin loader.
@@ -715,18 +709,15 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
return result;
}
#endif
-#endif
mo = mo->superClass();
}
-#ifndef QT_NO_ACCESSIBILITY
if (object == qApp) {
QAccessibleInterface *appInterface = new QAccessibleApplication;
QAccessibleCache::instance()->insert(object, appInterface);
Q_ASSERT(QAccessibleCache::instance()->objectToId.contains(qApp));
return appInterface;
}
-#endif
return 0;
}
@@ -796,10 +787,8 @@ QAccessibleInterface *QAccessible::accessibleInterface(Id id)
*/
bool QAccessible::isActive()
{
-#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
return pfAccessibility->isActive();
-#endif
return false;
}
@@ -834,10 +823,8 @@ void QAccessible::setRootObject(QObject *object)
return;
}
-#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->setRootObject(object);
-#endif
}
/*!
@@ -864,7 +851,6 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
if (!isActive())
return;
-#ifndef QT_NO_ACCESSIBILITY
if (event->type() == QAccessible::TableModelChanged) {
if (QAccessibleInterface *iface = event->accessibleInterface()) {
if (iface->tableInterface())
@@ -879,7 +865,6 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->notifyAccessibilityUpdate(event);
-#endif
}
#if QT_DEPRECATED_SINCE(5, 0)
@@ -1826,7 +1811,7 @@ QDebug operator<<(QDebug d, const QAccessibleEvent &ev)
d.nospace() << ")";
return d.space();
}
-
+#endif // QT_NO_DEBUGSTREAM
/*!
\class QAccessibleTextInterface
@@ -2630,8 +2615,7 @@ QString qAccessibleLocalizedActionDescription(const QString &actionName)
return accessibleActionStrings()->localizedDescription(actionName);
}
-
-#endif
+#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE