Cocoa: Disable accessibility.

The accessibility implementation is unstable and
causes application crashes. Disable until it has
been stabilized.

Change-Id: Ic34361a0ad599c6f92df722499d274fe0655646b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
Morten Johan Sørvig 2012-11-28 13:57:06 +01:00 committed by The Qt Project
parent 43169abdf8
commit 134f5e0cce
8 changed files with 28 additions and 3 deletions

View File

@ -106,5 +106,8 @@ contains(QT_CONFIG,build_all):CONFIG -= build_all
# DEFINES += QT_COCOA_ENABLE_ACCESSIBILITY_INSPECTOR
# include ($$PWD/../../../../util/accessibilityinspector/accessibilityinspector.pri)
# Accessibility is currently unstable and disabled.
DEFINES += QT_NO_COCOA_ACCESSIBILITY
# Window debug support
#DEFINES += QT_COCOA_ENABLE_WINDOW_DEBUG

View File

@ -44,6 +44,9 @@
#include <Cocoa/Cocoa.h>
#include <QtGui>
#ifndef QT_NO_COCOA_ACCESSIBILITY
#include <qpa/qplatformaccessibility.h>
class QCococaAccessibility : public QPlatformAccessibility
@ -87,4 +90,6 @@ id getValueAttribute(QAccessibleInterface *interface);
}
#endif // QT_NO_COCOA_ACCESSIBILITY
#endif

View File

@ -44,6 +44,8 @@
#include <qaccessible2.h>
#include <private/qcore_mac_p.h>
#ifndef QT_NO_COCOA_ACCESSIBILITY
QCococaAccessibility::QCococaAccessibility()
{
@ -315,3 +317,5 @@ id getValueAttribute(QAccessibleInterface *interface)
}
} // namespace QCocoaAccessible
#endif // QT_NO_COCOA_ACCESSIBILITY

View File

@ -45,6 +45,8 @@
#import <Cocoa/Cocoa.h>
#import <AppKit/NSAccessibility.h>
#ifndef QT_NO_COCOA_ACCESSIBILITY
@class QCocoaAccessibleElement;
@interface QCocoaAccessibleElement : NSObject {
@ -58,5 +60,7 @@
@end
#endif // QT_NO_COCOA_ACCESSIBILITY
#endif

View File

@ -47,6 +47,8 @@
#import <AppKit/NSAccessibility.h>
#ifndef QT_NO_COCOA_ACCESSIBILITY
static QAccessibleInterface *acast(void *ptr)
{
return reinterpret_cast<QAccessibleInterface *>(ptr);
@ -254,3 +256,6 @@ static QAccessibleInterface *acast(void *ptr)
}
@end
#endif // QT_NO_COCOA_ACCESSIBILITY

View File

@ -128,7 +128,7 @@ private:
QAbstractEventDispatcher *mEventDispatcher;
QScopedPointer<QPlatformInputContext> mInputContext;
#ifndef QT_NO_ACCESSIBILITY
#ifndef QT_NO_COCOA_ACCESSIBILITY
QScopedPointer<QPlatformAccessibility> mAccessibility;
#endif
QScopedPointer<QPlatformTheme> mPlatformTheme;

View File

@ -180,7 +180,7 @@ QCocoaIntegration::QCocoaIntegration()
: mFontDb(new QCoreTextFontDatabase())
, mEventDispatcher(new QCocoaEventDispatcher())
, mInputContext(new QCocoaInputContext)
#ifndef QT_NO_ACCESSIBILITY
#ifndef QT_NO_COCOA_ACCESSIBILITY
, mAccessibility(new QCococaAccessibility)
#endif
, mCocoaClipboard(new QCocoaClipboard)
@ -358,7 +358,7 @@ QPlatformInputContext *QCocoaIntegration::inputContext() const
QPlatformAccessibility *QCocoaIntegration::accessibility() const
{
#ifndef QT_NO_ACCESSIBILITY
#ifndef QT_NO_COCOA_ACCESSIBILITY
return mAccessibility.data();
#else
return 0;

View File

@ -51,6 +51,8 @@
#import <AppKit/NSAccessibility.h>
#ifndef QT_NO_COCOA_ACCESSIBILITY
@implementation QNSView (QNSViewAccessibility)
// The QNSView is a container that the user does not interact directly with:
@ -101,3 +103,5 @@
}
@end
#endif // QT_NO_COCOA_ACCESSIBILITY