Compile with -no-feature-accessibility

Task-number: QTBUG-38045
Change-Id: Id436b70aa6161bdf2428ca0a605212b278c71849
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
bb10
Frederik Gladhorn 2014-07-02 14:10:30 +02:00
parent d807a16e7f
commit 4cceceff15
16 changed files with 42 additions and 23 deletions

View File

@ -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.
@ -714,19 +708,16 @@ 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

View File

@ -41,6 +41,8 @@
#include "qaccessiblecache_p.h"
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
/*!
@ -127,3 +129,5 @@ void QAccessibleCache::deleteInterface(QAccessible::Id id, QObject *obj)
}
QT_END_NAMESPACE
#endif

View File

@ -59,6 +59,8 @@
#include "qaccessible.h"
#ifndef QT_NO_ACCESSIBILITY
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QMacAccessibilityElement));
QT_BEGIN_NAMESPACE
@ -98,4 +100,6 @@ private:
QT_END_NAMESPACE
#endif // QT_NO_ACCESSIBILITY
#endif

View File

@ -42,11 +42,11 @@
#ifndef QACCESSIBLEBRIDGEUTILS_H
#define QACCESSIBLEBRIDGEUTILS_H
#ifndef QT_NO_ACCESSIBILITY
#include <QtCore/qstringlist.h>
#include <QtGui/qaccessible.h>
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
namespace QAccessibleBridgeUtils {

View File

@ -46,6 +46,7 @@
#include <QtDBus/qdbuspendingreply.h>
#include <qdebug.h>
#ifndef QT_NO_ACCESSIBILITY
#include "deviceeventcontroller_adaptor.h"
#include "atspi/atspi-constants.h"
@ -235,3 +236,5 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerError(const QDBusError& error
}
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY

View File

@ -47,6 +47,8 @@
#include <QtDBus/QDBusConnection>
#include <QtGui/QAccessibleInterface>
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
/*
@ -83,4 +85,6 @@ private:
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY
#endif

View File

@ -49,6 +49,7 @@
#include <qdebug.h>
#ifndef QT_NO_ACCESSIBILITY
#include "socket_interface.h"
#include "constant_mappings_p.h"
@ -2351,3 +2352,4 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString
}
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY

View File

@ -52,6 +52,7 @@
#include "dbusconnection_p.h"
#include "struct_marshallers_p.h"
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
class QAccessibleInterface;
@ -212,5 +213,6 @@ private:
};
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY
#endif

View File

@ -52,6 +52,7 @@
#include "dbusconnection_p.h"
#include "struct_marshallers_p.h"
#ifndef QT_NO_ACCESSIBILITY
#include "deviceeventcontroller_adaptor.h"
QT_BEGIN_NAMESPACE
@ -272,3 +273,4 @@ void QSpiAccessibleBridge::initializeConstantMappings()
}
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY

View File

@ -48,6 +48,7 @@
class DeviceEventControllerAdaptor;
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
class DBusConnection;
@ -79,5 +80,6 @@ private:
};
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY
#endif

View File

@ -41,10 +41,11 @@
#include "cache_p.h"
#include "cache_adaptor.h"
#include "bridge_p.h"
#ifndef QT_NO_ACCESSIBILITY
#include "cache_adaptor.h"
#define QSPI_OBJECT_PATH_CACHE "/org/a11y/atspi/cache"
QT_BEGIN_NAMESPACE
@ -90,3 +91,4 @@ QSpiAccessibleCacheArray QSpiDBusCache::GetItems()
}
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY

View File

@ -46,6 +46,7 @@
#include <QtCore/QObject>
#include "struct_marshallers_p.h"
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
class QSpiDBusCache : public QObject
@ -66,5 +67,6 @@ public Q_SLOTS:
};
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY
#endif /* Q_SPI_CACHE_H */

View File

@ -53,6 +53,7 @@
// "ruler" "autocomplete" "edit bar" "embedded component" "entry" "caption"
// "heading" "page" "section" "redundant object" "form" "input method window" "menu"
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
QHash <QAccessible::Role, RoleNames> qSpiRoleMapping;
@ -150,3 +151,4 @@ AtspiRelationType qAccessibleRelationToAtSpiRelation(QAccessible::Relation relat
}
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY

View File

@ -53,6 +53,7 @@
#include <QtGui/QAccessible>
#include <atspi/atspi-constants.h>
#ifndef QT_NO_ACCESSIBILITY
// interface names from at-spi2-core/atspi/atspi-misc-private.h
#define ATSPI_DBUS_NAME_REGISTRY "org.a11y.atspi.Registry"
@ -132,5 +133,6 @@ QSpiUIntList spiStateSetFromSpiStates(quint64 states);
AtspiRelationType qAccessibleRelationToAtSpiRelation(QAccessible::Relation relation);
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY
#endif /* Q_SPI_CONSTANT_MAPPINGS_H */

View File

@ -48,6 +48,7 @@
#include "bridge_p.h"
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
QSpiObjectReference::QSpiObjectReference()
@ -235,3 +236,4 @@ void qSpiInitializeStructTypes()
}
QT_END_NAMESPACE
#endif //QT_NO_ACCESSIBILITY

View File

@ -49,6 +49,7 @@
#include <QtDBus/QDBusConnection>
#include <QtDBus/QDBusObjectPath>
#ifndef QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
typedef QList <int> QSpiIntList;
@ -172,4 +173,5 @@ Q_DECLARE_METATYPE(QSpiAttributeSet)
Q_DECLARE_METATYPE(QSpiAppUpdate)
Q_DECLARE_METATYPE(QSpiDeviceEvent)
#endif //QT_NO_ACCESSIBILITY
#endif /* Q_SPI_STRUCT_MARSHALLERS_H */