Enable module build with QT_NO_ACCESSIBILITY

Change-Id: I330c3ddd70232d94eae5543cb0282b962e67eae5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
This commit is contained in:
Tasuku Suzuki 2012-11-23 05:20:04 +09:00 committed by The Qt Project
parent bc71836fc4
commit b7f63c6bf7
15 changed files with 58 additions and 10 deletions

View File

@ -55,6 +55,8 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
/*!
\class QAccessible
\brief The QAccessible class provides enums and static functions
@ -437,23 +439,19 @@ 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()
@ -597,10 +595,8 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object)
mo = mo->superClass();
}
#ifndef QT_NO_ACCESSIBILITY
if (object == qApp)
return new QAccessibleApplication;
#endif
return 0;
}
@ -640,10 +636,8 @@ void QAccessible::setRootObject(QObject *object)
return;
}
#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->setRootObject(object);
#endif
}
/*!
@ -675,10 +669,8 @@ void QAccessible::updateAccessibility(QAccessibleEvent *event)
if (!isActive())
return;
#ifndef QT_NO_ACCESSIBILITY
if (QPlatformAccessibility *pfAccessibility = platformAccessibility())
pfAccessibility->notifyAccessibilityUpdate(event);
#endif
}
#if QT_DEPRECATED_SINCE(5, 0)
@ -1532,5 +1524,7 @@ QDebug operator<<(QDebug d, const QAccessibleEvent &ev)
#endif
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE

View File

@ -57,6 +57,7 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
class QAccessibleInterface;
class QAccessibleEvent;
@ -676,6 +677,8 @@ inline void QAccessible::updateAccessibility(QObject *object, int child, Event r
}
#endif
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
QT_END_HEADER

View File

@ -52,6 +52,8 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
/*!
\class QSpiApplicationAdaptor
\internal
@ -217,4 +219,6 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerError(const QDBusError& error
}
}
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE

View File

@ -49,6 +49,8 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
/*
* Used for the root object.
*
@ -80,6 +82,8 @@ private:
QDBusConnection dbusConnection;
};
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
QT_END_HEADER

View File

@ -65,6 +65,8 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
static bool isDebugging = false;
#define qAtspiDebug if (!::isDebugging); else qDebug
@ -2356,4 +2358,6 @@ bool AtSpiAdaptor::tableInterface(const QAIPointer &interface, const QString &fu
return true;
}
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE

View File

@ -56,6 +56,8 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
class QAccessibleInterface;
class QSpiAccessibleInterface;
class QSpiApplicationAdaptor;
@ -216,6 +218,8 @@ private:
uint sendWindow_unshade : 1;
};
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
QT_END_HEADER

View File

@ -56,6 +56,8 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
/*!
\class QSpiAccessibleBridge
\internal
@ -182,4 +184,6 @@ void QSpiAccessibleBridge::initializeConstantMappings()
qSpiRoleMapping.insert(map[i].role, RoleNames(map[i].spiRole, QLatin1String(map[i].name), tr(map[i].name)));
}
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE

View File

@ -51,6 +51,8 @@ class DeviceEventControllerAdaptor;
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
class DBusConnection;
class QSpiDBusCache;
class AtSpiAdaptor;
@ -79,6 +81,8 @@ private:
bool initialized;
};
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
QT_END_HEADER

View File

@ -49,6 +49,8 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
/*!
\class QSpiDBusCache
\internal
@ -89,4 +91,6 @@ QSpiAccessibleCacheArray QSpiDBusCache::GetItems()
return cacheArray;
}
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE

View File

@ -49,6 +49,8 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
class QSpiDBusCache : public QObject
{
Q_OBJECT
@ -66,6 +68,8 @@ public Q_SLOTS:
QSpiAccessibleCacheArray GetItems();
};
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
QT_END_HEADER

View File

@ -55,6 +55,8 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
QHash <QAccessible::Role, RoleNames> qSpiRoleMapping;
quint64 spiStatesFromQState(QAccessible::State state)
@ -154,4 +156,6 @@ AtspiRelationType qAccessibleRelationToAtSpiRelation(QAccessible::Relation relat
return ATSPI_RELATION_NULL;
}
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE

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"
@ -135,4 +136,6 @@ AtspiRelationType qAccessibleRelationToAtSpiRelation(QAccessible::Relation relat
QT_END_NAMESPACE
QT_END_HEADER
#endif // QT_NO_ACCESSIBILITY
#endif /* Q_SPI_CONSTANT_MAPPINGS_H */

View File

@ -48,6 +48,8 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
/*!
\class DBusConnection
\internal
@ -104,4 +106,6 @@ QDBusConnection DBusConnection::connection() const
return dbusConnection;
}
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE

View File

@ -49,6 +49,8 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
class DBusConnection
{
public:
@ -62,6 +64,8 @@ private:
QDBusConnection dbusConnection;
};
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE
QT_END_HEADER

View File

@ -50,6 +50,8 @@
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
QSpiObjectReference::QSpiObjectReference()
: path(QDBusObjectPath(ATSPI_DBUS_PATH_NULL))
{}
@ -234,4 +236,6 @@ void qSpiInitializeStructTypes()
qDBusRegisterMetaType<QSpiRelationArray>();
}
#endif // QT_NO_ACCESSIBILITY
QT_END_NAMESPACE