Replace QT_NO_ACCESSIBILITY with QT_CONFIG(accessibility)
Pick-to: 6.4 Change-Id: Iee4bd8970810be1b23bdba65a74de912401dca65 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
6dbe45c96a
commit
f53f709504
@ -12,7 +12,7 @@
|
||||
|
||||
#include <QtCore/qloggingcategory.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "socket_interface.h"
|
||||
#include "qspi_constant_mappings_p.h"
|
||||
#include <QtGui/private/qaccessiblebridgeutils_p.h>
|
||||
@ -2437,4 +2437,4 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_atspiadaptor_p.cpp"
|
||||
#endif //QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -15,7 +15,7 @@
|
||||
// "ruler" "autocomplete" "edit bar" "embedded component" "entry" "caption"
|
||||
// "heading" "page" "section" "redundant object" "form" "input method window" "menu"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
quint64 spiStatesFromQState(QAccessible::State state)
|
||||
@ -113,4 +113,4 @@ AtspiRelationType qAccessibleRelationToAtSpiRelation(QAccessible::Relation relat
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif //QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
#include "qspiaccessiblebridge_p.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QT_IMPL_METATYPE_EXTERN(QSpiIntList)
|
||||
@ -216,4 +216,4 @@ void qSpiInitializeStructTypes()
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif //QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "dbusconnection_p.h"
|
||||
#include "qspi_struct_marshallers_p.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "deviceeventcontroller_adaptor.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -268,4 +268,4 @@ RoleNames QSpiAccessibleBridge::namesForRole(QAccessible::Role role)
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qspiaccessiblebridge_p.cpp"
|
||||
#endif //QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <QtDBus/qdbuspendingreply.h>
|
||||
#include <qdebug.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "deviceeventcontroller_adaptor.h"
|
||||
#include "atspi/atspi-constants.h"
|
||||
|
||||
@ -202,4 +202,4 @@ QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qspiapplicationadaptor_p.cpp"
|
||||
|
||||
#endif //QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "qspidbuscache_p.h"
|
||||
#include "qspiaccessiblebridge_p.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "cache_adaptor.h"
|
||||
|
||||
#define QSPI_OBJECT_PATH_CACHE "/org/a11y/atspi/cache"
|
||||
@ -56,4 +56,4 @@ QSpiAccessibleCacheArray QSpiDBusCache::GetItems()
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qspidbuscache_p.cpp"
|
||||
#endif //QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -419,7 +419,7 @@ Q_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core");
|
||||
\sa QAccessibleInterface::interface_cast(), QAccessibleTextInterface, QAccessibleValueInterface, QAccessibleActionInterface, QAccessibleTableInterface, QAccessibleTableCellInterface
|
||||
*/
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
/*!
|
||||
Destroys the QAccessibleInterface.
|
||||
@ -2985,7 +2985,7 @@ QAccessibleHyperlinkInterface::~QAccessibleHyperlinkInterface()
|
||||
|
||||
}
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -8,11 +8,11 @@
|
||||
#pragma qt_class(QAccessible)
|
||||
#endif
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#ifndef QACCESSIBLE_H
|
||||
#define QACCESSIBLE_H
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include <QtCore/qcoreapplication.h>
|
||||
#include <QtCore/qdebug.h>
|
||||
@ -588,5 +588,5 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleEvent &ev);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
#endif // QACCESSIBLE_H
|
||||
#endif //!QT_NO_ACCESSIBILITY
|
||||
|
@ -1,19 +1,17 @@
|
||||
// Copyright (C) 2022 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#ifndef QACCESSIBLE_BASE_H
|
||||
#define QACCESSIBLE_BASE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#if 0
|
||||
// QAccessible class is handled in qaccessible.h
|
||||
#pragma qt_sync_stop_processing
|
||||
#endif
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtCore/qobjectdefs.h>
|
||||
|
||||
#include <cstring> // memset, memcmp
|
||||
@ -407,5 +405,5 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QAccessible::Relation)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QACCESSIBLE_BASE_H
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
#endif // QACCESSIBLE_BASE_H
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "qaccessiblebridge.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -104,4 +104,4 @@ QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qaccessiblebridge.cpp"
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -11,7 +11,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
class QAccessibleInterface;
|
||||
class QAccessibleEvent;
|
||||
@ -36,7 +36,7 @@ public:
|
||||
virtual QAccessibleBridge *create(const QString &key) = 0;
|
||||
};
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/qloggingcategory.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "qaccessible.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QMacAccessibilityElement));
|
||||
|
||||
@ -67,6 +67,6 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
#endif
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "qaccessibleobject.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QWindow>
|
||||
@ -203,4 +203,4 @@ QAccessible::State QAccessibleApplication::state() const
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -10,7 +10,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
class QAccessibleObjectPrivate;
|
||||
class QObject;
|
||||
@ -57,7 +57,7 @@ public:
|
||||
QAccessible::State state() const override;
|
||||
};
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include "qaccessibleplugin.h"
|
||||
#include "qaccessible.h"
|
||||
@ -56,4 +56,4 @@ QT_END_NAMESPACE
|
||||
|
||||
#include "moc_qaccessibleplugin.cpp"
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -11,7 +11,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
class QAccessibleInterface;
|
||||
|
||||
@ -29,7 +29,7 @@ public:
|
||||
virtual QAccessibleInterface *create(const QString &key, QObject *object) = 0;
|
||||
};
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -13,7 +13,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
/* accessiblebridge plugin discovery stuff */
|
||||
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, bridgeloader,
|
||||
@ -105,6 +105,6 @@ void QPlatformAccessibility::setActive(bool active)
|
||||
QAccessible::setActive(active);
|
||||
}
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include <QtCore/qobject.h>
|
||||
#include <QtGui/qaccessible.h>
|
||||
@ -42,6 +42,6 @@ private:
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
#endif // QPLATFORMACCESSIBILITY_H
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <QtCore/qlibraryinfo.h>
|
||||
#include <QtCore/private/qnumeric_p.h>
|
||||
#include <QtDebug>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#include <qpalette.h>
|
||||
@ -1853,7 +1853,7 @@ QFunctionPointer QGuiApplication::platformFunction(const QByteArray &function)
|
||||
*/
|
||||
int QGuiApplication::exec()
|
||||
{
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessible::setRootObject(qApp);
|
||||
#endif
|
||||
return QCoreApplication::exec();
|
||||
|
@ -342,7 +342,7 @@ QPlatformInputContext *QPlatformIntegration::inputContext() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
/*!
|
||||
Returns the platforms accessibility.
|
||||
|
@ -129,7 +129,7 @@ public:
|
||||
virtual QPlatformDrag *drag() const;
|
||||
#endif
|
||||
virtual QPlatformInputContext *inputContext() const;
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
virtual QPlatformAccessibility *accessibility() const;
|
||||
#endif
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "qwindow_p.h"
|
||||
#include "qguiapplication_p.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
# include "qaccessible.h"
|
||||
#endif
|
||||
#include "qhighdpiscaling_p.h"
|
||||
@ -2438,7 +2438,7 @@ bool QWindow::event(QEvent *ev)
|
||||
|
||||
case QEvent::FocusIn: {
|
||||
focusInEvent(static_cast<QFocusEvent *>(ev));
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessible::State state;
|
||||
state.active = true;
|
||||
QAccessibleStateChangeEvent event(this, state);
|
||||
@ -2448,7 +2448,7 @@ bool QWindow::event(QEvent *ev)
|
||||
|
||||
case QEvent::FocusOut: {
|
||||
focusOutEvent(static_cast<QFocusEvent *>(ev));
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessible::State state;
|
||||
state.active = true;
|
||||
QAccessibleStateChangeEvent event(this, state);
|
||||
|
@ -131,10 +131,10 @@ void QAndroidPlatformNativeInterface::customEvent(QEvent *event)
|
||||
QAndroidPlatformIntegration *api = static_cast<QAndroidPlatformIntegration *>(QGuiApplicationPrivate::platformIntegration());
|
||||
QtAndroid::setAndroidPlatformIntegration(api);
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
// Android accessibility activation event might have been already received
|
||||
api->accessibility()->setActive(QtAndroidAccessibility::isActive());
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
if (!m_running) {
|
||||
m_running = true;
|
||||
@ -145,7 +145,7 @@ void QAndroidPlatformNativeInterface::customEvent(QEvent *event)
|
||||
|
||||
QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶mList)
|
||||
: m_touchDevice(nullptr)
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
, m_accessibility(nullptr)
|
||||
#endif
|
||||
{
|
||||
@ -179,9 +179,9 @@ QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶
|
||||
|
||||
m_androidSystemLocale = new QAndroidSystemLocale;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
m_accessibility = new QAndroidPlatformAccessibility();
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QJniObject javaActivity(QtAndroid::activity());
|
||||
if (!javaActivity.isValid())
|
||||
@ -463,7 +463,7 @@ void QAndroidPlatformIntegration::flushPendingUpdates()
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QPlatformAccessibility *QAndroidPlatformIntegration::accessibility() const
|
||||
{
|
||||
return m_accessibility;
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
QPlatformNativeInterface *nativeInterface() const override;
|
||||
QPlatformServices *services() const override;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
virtual QPlatformAccessibility *accessibility() const override;
|
||||
#endif
|
||||
|
||||
@ -132,7 +132,7 @@ private:
|
||||
#endif
|
||||
|
||||
QAndroidSystemLocale *m_androidSystemLocale;
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
mutable QPlatformAccessibility *m_accessibility;
|
||||
#endif
|
||||
|
||||
|
@ -4,7 +4,9 @@
|
||||
#ifndef QCOCOAACCESIBILITY_H
|
||||
#define QCOCOAACCESIBILITY_H
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include <qpa/qplatformaccessibility.h>
|
||||
|
||||
@ -58,6 +60,6 @@ id getValueAttribute(QAccessibleInterface *interface);
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
#endif // QCOCOAACCESIBILITY_H
|
||||
|
@ -13,7 +13,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
QCocoaAccessibility::QCocoaAccessibility()
|
||||
{
|
||||
@ -366,7 +366,7 @@ id getValueAttribute(QAccessibleInterface *interface)
|
||||
|
||||
} // namespace QCocoaAccessible
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -4,9 +4,9 @@
|
||||
#ifndef QCOCOAACCESIBILITYELEMENT_H
|
||||
#define QCOCOAACCESIBILITYELEMENT_H
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include <QtCore/private/qcore_mac_p.h>
|
||||
#include <QtGui/qaccessible.h>
|
||||
@ -16,6 +16,6 @@ QT_DECLARE_NAMESPACED_OBJC_INTERFACE(QMacAccessibilityElement, NSObject <NSAcces
|
||||
+ (instancetype)elementWithId:(QAccessible::Id)anId;
|
||||
)
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
#endif // QCOCOAACCESIBILITYELEMENT_H
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
QT_USE_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
/**
|
||||
* Converts between absolute character offsets and line numbers of a
|
||||
@ -616,4 +616,4 @@ static void convertLineOffset(QAccessibleTextInterface *text, int *line, int *of
|
||||
|
||||
@end
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
QCoreTextFontDatabase *fontDatabase() const override;
|
||||
QCocoaNativeInterface *nativeInterface() const override;
|
||||
QPlatformInputContext *inputContext() const override;
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QCocoaAccessibility *accessibility() const override;
|
||||
#endif
|
||||
#ifndef QT_NO_CLIPBOARD
|
||||
@ -104,7 +104,7 @@ private:
|
||||
QScopedPointer<QCoreTextFontDatabase> mFontDb;
|
||||
|
||||
QScopedPointer<QPlatformInputContext> mInputContext;
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QScopedPointer<QCocoaAccessibility> mAccessibility;
|
||||
#endif
|
||||
QScopedPointer<QPlatformTheme> mPlatformTheme;
|
||||
|
@ -94,7 +94,7 @@ QCocoaIntegration *QCocoaIntegration::mInstance = nullptr;
|
||||
QCocoaIntegration::QCocoaIntegration(const QStringList ¶mList)
|
||||
: mOptions(parseOptions(paramList))
|
||||
, mFontDb(nullptr)
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
, mAccessibility(new QCocoaAccessibility)
|
||||
#endif
|
||||
#ifndef QT_NO_CLIPBOARD
|
||||
@ -344,7 +344,7 @@ QPlatformInputContext *QCocoaIntegration::inputContext() const
|
||||
return mInputContext.data();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QCocoaAccessibility *QCocoaIntegration::accessibility() const
|
||||
{
|
||||
return mAccessibility.data();
|
||||
|
@ -363,7 +363,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSViewMouseMoveHelper);
|
||||
#include "qnsview_keys.mm"
|
||||
#include "qnsview_complextext.mm"
|
||||
#include "qnsview_menus.mm"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qnsview_accessibility.mm"
|
||||
#endif
|
||||
|
||||
|
@ -52,7 +52,7 @@ public:
|
||||
QPlatformNativeInterface *nativeInterface() const override;
|
||||
|
||||
QPointingDevice *touchDevice();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QPlatformAccessibility *accessibility() const override;
|
||||
#endif
|
||||
|
||||
|
@ -247,7 +247,7 @@ QPointingDevice *QIOSIntegration::touchDevice()
|
||||
return m_touchDevice;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QPlatformAccessibility *QIOSIntegration::accessibility() const
|
||||
{
|
||||
if (!m_accessibility)
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <qpa/qplatformaccessibility.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "qiosplatformaccessibility.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include <QtGui/QtGui>
|
||||
#include "qioswindow.h"
|
||||
|
@ -7,7 +7,7 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <QtGui/QtGui>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
@interface QT_MANGLE_NAMESPACE(QMacAccessibilityElement) : UIAccessibilityElement
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "quiaccessibilityelement.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include "private/qaccessiblecache_p.h"
|
||||
#include "private/qcore_mac_p.h"
|
||||
|
@ -722,7 +722,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
|
||||
@end
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
// Include category as an alternative to using -ObjC (Apple QA1490)
|
||||
#include "quiview_accessibility.mm"
|
||||
#endif
|
||||
|
@ -48,9 +48,9 @@
|
||||
#include <QtGui/QOpenGLContext>
|
||||
#include <QtGui/QScreen>
|
||||
#include <QtGui/QOffscreenSurface>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <qpa/qplatformaccessibility.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY_ATSPI_BRIDGE
|
||||
#if QT_CONFIG(accessibility_atspi_bridge)
|
||||
#include <QtGui/private/qspiaccessiblebridge_p.h>
|
||||
#endif
|
||||
#endif
|
||||
@ -383,7 +383,7 @@ QPlatformInputContext *QXcbIntegration::inputContext() const
|
||||
return m_inputContext.data();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QPlatformAccessibility *QXcbIntegration::accessibility() const
|
||||
{
|
||||
#if !defined(QT_NO_ACCESSIBILITY_ATSPI_BRIDGE)
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
|
||||
QPlatformInputContext *inputContext() const override;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QPlatformAccessibility *accessibility() const override;
|
||||
#endif
|
||||
|
||||
@ -110,7 +110,7 @@ private:
|
||||
|
||||
QScopedPointer<QPlatformInputContext> m_inputContext;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
mutable QScopedPointer<QPlatformAccessibility> m_accessibility;
|
||||
#endif
|
||||
|
||||
|
@ -317,7 +317,7 @@ static const int closeButtonSize = 14;
|
||||
static const qreal closeButtonCornerRadius = 2.0;
|
||||
#endif // QT_CONFIG(tabbar)
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY // This ifdef to avoid "unused function" warning.
|
||||
#if QT_CONFIG(accessibility) // This ifdef to avoid "unused function" warning.
|
||||
QBrush brushForToolButton(bool isOnKeyWindow)
|
||||
{
|
||||
// When a toolbutton in a toolbar is in the 'ON' state, we draw a
|
||||
@ -328,7 +328,7 @@ QBrush brushForToolButton(bool isOnKeyWindow)
|
||||
|
||||
return isOnKeyWindow ? QColor(0, 0, 0, 28) : QColor(0, 0, 0, 21);
|
||||
}
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
|
||||
static const int headerSectionArrowHeight = 6;
|
||||
@ -2866,7 +2866,7 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
|
||||
case SH_ScrollBar_Transient:
|
||||
if ((qobject_cast<const QScrollBar *>(w) && w->parent() &&
|
||||
qobject_cast<QAbstractScrollArea*>(w->parent()->parent()))
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|| (opt && QStyleHelper::hasAncestor(opt->styleObject, QAccessible::ScrollBar))
|
||||
#endif
|
||||
) {
|
||||
@ -3541,7 +3541,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
if (const QStyleOptionToolButton *tb = qstyleoption_cast<const QStyleOptionToolButton *>(opt)) {
|
||||
QStyleOptionToolButton myTb = *tb;
|
||||
myTb.state &= ~State_AutoRaise;
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QStyleHelper::hasAncestor(opt->styleObject, QAccessible::ToolBar)) {
|
||||
QRect cr = tb->rect;
|
||||
int shiftX = 0;
|
||||
@ -3631,7 +3631,7 @@ void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter
|
||||
QCommonStyle::drawControl(ce, &myTb, p, w);
|
||||
}
|
||||
} else
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
{
|
||||
QCommonStyle::drawControl(ce, &myTb, p, w);
|
||||
}
|
||||
@ -5701,7 +5701,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
|
||||
case CC_ToolButton:
|
||||
if (const QStyleOptionToolButton *tb
|
||||
= qstyleoption_cast<const QStyleOptionToolButton *>(opt)) {
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QStyleHelper::hasAncestor(opt->styleObject, QAccessible::ToolBar)) {
|
||||
if (tb->subControls & SC_ToolButtonMenu) {
|
||||
QStyleOption arrowOpt = *tb;
|
||||
@ -5727,7 +5727,7 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
|
||||
}
|
||||
proxy()->drawControl(CE_ToolButtonLabel, opt, p, widget);
|
||||
} else
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
{
|
||||
auto bflags = tb->state;
|
||||
if (tb->subControls & SC_ToolButton)
|
||||
@ -6209,7 +6209,7 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op
|
||||
case CC_ToolButton:
|
||||
ret = QCommonStyle::subControlRect(cc, opt, sc, widget);
|
||||
if (sc == SC_ToolButtonMenu) {
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QStyleHelper::hasAncestor(opt->styleObject, QAccessible::ToolBar))
|
||||
ret.adjust(-toolButtonArrowMargin, 0, 0, 0);
|
||||
#endif
|
||||
|
@ -466,7 +466,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
|
||||
}
|
||||
break;
|
||||
case PE_Frame: {
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QStyleHelper::isInstanceOf(option->styleObject, QAccessible::EditableText)
|
||||
|| QStyleHelper::isInstanceOf(option->styleObject, QAccessible::StaticText) ||
|
||||
#else
|
||||
@ -639,7 +639,7 @@ void QWindowsVistaStyle::drawPrimitive(PrimitiveElement element, const QStyleOpt
|
||||
newStyle = !qobject_cast<const QTableView*>(view);
|
||||
selectionBehavior = view->selectionBehavior();
|
||||
selectionMode = view->selectionMode();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
} else if (!widget) {
|
||||
newStyle = !QStyleHelper::hasAncestor(option->styleObject, QAccessible::MenuItem) ;
|
||||
#endif
|
||||
|
@ -36,7 +36,7 @@
|
||||
#endif
|
||||
#include <QDebug>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -508,4 +508,4 @@ QAccessibleScrollArea::QAccessibleScrollArea(QWidget *widget)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
class QAbstractButton;
|
||||
class QHeaderView;
|
||||
@ -113,7 +113,7 @@ protected:
|
||||
};
|
||||
#endif // QT_CONFIG(combobox)
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#endif
|
||||
#include <private/qwidget_p.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -1235,4 +1235,4 @@ QHeaderView *QAccessibleTableHeaderCell::headerView() const
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -26,7 +26,7 @@ QT_REQUIRE_CONFIG(itemviews);
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
class QAccessibleTableCell;
|
||||
class QAccessibleTableHeaderCell;
|
||||
@ -264,7 +264,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <qstyle.h>
|
||||
#include <private/qwidget_p.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -357,5 +357,5 @@ QWidget *QAccessibleMenuItem::owner() const
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#if QT_CONFIG(menu)
|
||||
class QMenu;
|
||||
@ -103,5 +103,5 @@ private:
|
||||
#endif // QT_CONFIG(menu)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
#endif // QACCESSIBLEMENU_H
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "qaccessiblewidget.h"
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include "qapplication.h"
|
||||
#if QT_CONFIG(groupbox)
|
||||
@ -498,4 +498,4 @@ void *QAccessibleWidget::interface_cast(QAccessible::InterfaceType t)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif //QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -10,7 +10,7 @@
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
class QAccessibleWidgetPrivate;
|
||||
|
||||
@ -58,7 +58,7 @@ private:
|
||||
};
|
||||
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <qvariant.h>
|
||||
#include <qaccessible.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -199,4 +199,4 @@ QAccessibleInterface *qAccessibleFactory(const QString &classname, QObject *obje
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -56,7 +56,7 @@
|
||||
#include <QMenu>
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@ -1118,4 +1118,4 @@ QMainWindow *QAccessibleMainWindow::mainWindow() const
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <QtWidgets/private/qtwidgetsglobal_p.h>
|
||||
#include <QtWidgets/qaccessiblewidget.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#include <QtCore/QPointer>
|
||||
#include <QtCore/QPair>
|
||||
@ -283,7 +283,7 @@ public:
|
||||
};
|
||||
#endif // QT_CONFIG(mainwindow)
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -31,7 +31,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
#if QT_CONFIG(spinbox)
|
||||
QAccessibleAbstractSpinBox::QAccessibleAbstractSpinBox(QWidget *w)
|
||||
@ -393,6 +393,6 @@ QDial *QAccessibleDial::dial() const
|
||||
}
|
||||
#endif // QT_CONFIG(dial)
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
class QAbstractSpinBox;
|
||||
class QAbstractSlider;
|
||||
@ -163,7 +163,7 @@ protected:
|
||||
};
|
||||
#endif // QT_CONFIG(dial)
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
using namespace Qt::StringLiterals;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
extern QList<QWidget*> childWidgets(const QWidget *widget);
|
||||
|
||||
@ -951,6 +951,6 @@ QWindowContainer *QAccessibleWindowContainer::container() const
|
||||
return static_cast<QWindowContainer *>(widget());
|
||||
}
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
|
||||
class QAbstractButton;
|
||||
class QLineEdit;
|
||||
@ -189,7 +189,7 @@ private:
|
||||
QWindowContainer *container() const;
|
||||
};
|
||||
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <qpa/qplatformtheme.h>
|
||||
#include "private/qdialog_p.h"
|
||||
#include "private/qguiapplication_p.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
|
||||
@ -812,7 +812,7 @@ void QDialog::setVisible(bool visible)
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleEvent event(this, QAccessible::DialogStart);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -821,7 +821,7 @@ void QDialog::setVisible(bool visible)
|
||||
if (testAttribute(Qt::WA_WState_ExplicitShowHide) && testAttribute(Qt::WA_WState_Hidden))
|
||||
return;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (isVisible()) {
|
||||
QAccessibleEvent event(this, QAccessible::DialogEnd);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
|
@ -1564,7 +1564,7 @@ void QMessageBox::showEvent(QShowEvent *e)
|
||||
d->detectEscapeButton();
|
||||
d->updateSize();
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleEvent event(this, QAccessible::Alert);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <private/qapplication_p.h>
|
||||
#include <private/qguiapplication_p.h>
|
||||
#include <private/qscrollbar_p.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <qaccessible.h>
|
||||
#endif
|
||||
#if QT_CONFIG(gestures) && QT_CONFIG(scroller)
|
||||
@ -1131,7 +1131,7 @@ void QAbstractItemView::reset()
|
||||
setRootIndex(QModelIndex());
|
||||
if (d->selectionModel)
|
||||
d->selectionModel->reset();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
QAccessibleTableModelChangeEvent accessibleEvent(this, QAccessibleTableModelChangeEvent::ModelReset);
|
||||
QAccessible::updateAccessibility(&accessibleEvent);
|
||||
@ -3398,7 +3398,7 @@ void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelInde
|
||||
}
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
QAccessibleTableModelChangeEvent accessibleEvent(this, QAccessibleTableModelChangeEvent::DataChanged);
|
||||
accessibleEvent.setFirstRow(topLeft.row());
|
||||
@ -3526,7 +3526,7 @@ void QAbstractItemViewPrivate::_q_rowsRemoved(const QModelIndex &index, int star
|
||||
if (q->isVisible())
|
||||
q->updateEditorGeometries();
|
||||
q->setState(QAbstractItemView::NoState);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::RowsRemoved);
|
||||
accessibleEvent.setFirstRow(start);
|
||||
@ -3617,7 +3617,7 @@ void QAbstractItemViewPrivate::_q_columnsRemoved(const QModelIndex &index, int s
|
||||
if (q->isVisible())
|
||||
q->updateEditorGeometries();
|
||||
q->setState(QAbstractItemView::NoState);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::ColumnsRemoved);
|
||||
accessibleEvent.setFirstColumn(start);
|
||||
@ -3640,7 +3640,7 @@ void QAbstractItemViewPrivate::_q_rowsInserted(const QModelIndex &index, int sta
|
||||
Q_UNUSED(start);
|
||||
Q_UNUSED(end);
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
Q_Q(QAbstractItemView);
|
||||
if (QAccessible::isActive()) {
|
||||
QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::RowsInserted);
|
||||
@ -3666,7 +3666,7 @@ void QAbstractItemViewPrivate::_q_columnsInserted(const QModelIndex &index, int
|
||||
Q_Q(QAbstractItemView);
|
||||
if (q->isVisible())
|
||||
q->updateEditorGeometries();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::ColumnsInserted);
|
||||
accessibleEvent.setFirstColumn(start);
|
||||
@ -3694,7 +3694,7 @@ void QAbstractItemViewPrivate::_q_modelDestroyed()
|
||||
void QAbstractItemViewPrivate::_q_layoutChanged()
|
||||
{
|
||||
doDelayedItemsLayout();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
Q_Q(QAbstractItemView);
|
||||
if (QAccessible::isActive()) {
|
||||
QAccessibleTableModelChangeEvent accessibleEvent(q, QAccessibleTableModelChangeEvent::ModelReset);
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "qlistview.h"
|
||||
|
||||
#include <qabstractitemdelegate.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <qaccessible.h>
|
||||
#endif
|
||||
#include <qapplication.h>
|
||||
@ -3392,7 +3392,7 @@ void QIconModeViewBase::updateContentsSize()
|
||||
*/
|
||||
void QListView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
||||
{
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
if (current.isValid()) {
|
||||
int entry = visualIndex(current);
|
||||
@ -3411,7 +3411,7 @@ void QListView::currentChanged(const QModelIndex ¤t, const QModelIndex &pr
|
||||
void QListView::selectionChanged(const QItemSelection &selected,
|
||||
const QItemSelection &deselected)
|
||||
{
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
// ### does not work properly for selection ranges.
|
||||
QModelIndex sel = selected.indexes().value(0);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <private/qtableview_p.h>
|
||||
#include <private/qheaderview_p.h>
|
||||
#include <private/qscrollbar_p.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <qaccessible.h>
|
||||
#endif
|
||||
|
||||
@ -3457,7 +3457,7 @@ void QTableViewPrivate::selectColumn(int column, bool anchor)
|
||||
*/
|
||||
void QTableView::currentChanged(const QModelIndex ¤t, const QModelIndex &previous)
|
||||
{
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
if (current.isValid()) {
|
||||
Q_D(QTableView);
|
||||
@ -3479,7 +3479,7 @@ void QTableView::selectionChanged(const QItemSelection &selected,
|
||||
{
|
||||
Q_D(QTableView);
|
||||
Q_UNUSED(d);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
// ### does not work properly for selection ranges.
|
||||
QModelIndex sel = selected.indexes().value(0);
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <qdebug.h>
|
||||
#include <QMetaMethod>
|
||||
#include <private/qscrollbar_p.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <qaccessible.h>
|
||||
#endif
|
||||
|
||||
@ -3992,7 +3992,7 @@ void QTreeView::currentChanged(const QModelIndex ¤t, const QModelIndex &pr
|
||||
viewport()->update(currentRect);
|
||||
}
|
||||
}
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive() && current.isValid()) {
|
||||
Q_D(QTreeView);
|
||||
|
||||
@ -4010,7 +4010,7 @@ void QTreeView::selectionChanged(const QItemSelection &selected,
|
||||
const QItemSelection &deselected)
|
||||
{
|
||||
QAbstractItemView::selectionChanged(selected, deselected);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
Q_D(QTreeView);
|
||||
|
||||
|
@ -48,7 +48,7 @@
|
||||
#if QT_CONFIG(whatsthis)
|
||||
#include <QtWidgets/QWhatsThis>
|
||||
#endif
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <QtGui/qaccessible_base.h>
|
||||
#endif
|
||||
|
||||
@ -475,7 +475,7 @@ void QApplicationPrivate::init()
|
||||
initialize();
|
||||
eventDispatcher->startingUp();
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
// factory for accessible interfaces for widgets shipped with Qt
|
||||
QAccessible::installFactory(&qAccessibleFactory);
|
||||
#endif
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <qpa/qplatformtheme.h>
|
||||
#include "private/qtextdocumentlayout_p.h"
|
||||
#include "qdebug.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
|
||||
@ -366,7 +366,7 @@ QWhatsThisPrivate::QWhatsThisPrivate()
|
||||
QGuiApplication::setOverrideCursor(Qt::WhatsThisCursor);
|
||||
#endif
|
||||
}
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleEvent event(this, QAccessible::ContextHelpStart);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -381,7 +381,7 @@ QWhatsThisPrivate::~QWhatsThisPrivate()
|
||||
#ifndef QT_NO_CURSOR
|
||||
QGuiApplication::restoreOverrideCursor();
|
||||
#endif
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleEvent event(this, QAccessible::ContextHelpEnd);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "qwidget.h"
|
||||
#include "qstyleoption.h"
|
||||
#include "qstylehints.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
# include "qaccessible.h"
|
||||
#endif
|
||||
#include <qpa/qplatformwindow.h>
|
||||
@ -6512,7 +6512,7 @@ void QWidget::setFocus(Qt::FocusReason reason)
|
||||
f->d_func()->updateFocusChild();
|
||||
|
||||
QApplicationPrivate::setFocusWidget(f, reason);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
// menus update the focus manually and this would create bogus events
|
||||
if (!(f->inherits("QMenuBar") || f->inherits("QMenu") || f->inherits("QMenuItem")))
|
||||
{
|
||||
@ -6687,7 +6687,7 @@ void QWidget::clearFocus()
|
||||
if (hasFocus()) {
|
||||
// Update proxy state
|
||||
QApplicationPrivate::setFocusWidget(nullptr, Qt::OtherFocusReason);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleEvent event(this, QAccessible::Focus);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -7962,7 +7962,7 @@ void QWidgetPrivate::show_helper()
|
||||
if (!isEmbedded && q->windowType() == Qt::Popup)
|
||||
qApp->d_func()->openPopup(q);
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (q->windowType() != Qt::ToolTip) { // Tooltips are read aloud twice in MS narrator.
|
||||
QAccessibleEvent event(q, QAccessible::ObjectShow);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
@ -8108,7 +8108,7 @@ void QWidgetPrivate::hide_helper()
|
||||
if (QWidgetRepaintManager *repaintManager = maybeRepaintManager())
|
||||
repaintManager->removeDirtyWidget(q);
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (wasVisible) {
|
||||
QAccessibleEvent event(q, QAccessible::ObjectHide);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
@ -8356,7 +8356,7 @@ void QWidgetPrivate::hideChildren(bool spontaneous)
|
||||
}
|
||||
}
|
||||
qApp->d_func()->sendSyntheticEnterLeave(widget);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (!spontaneous) {
|
||||
QAccessibleEvent event(widget, QAccessible::ObjectHide);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
@ -9262,7 +9262,7 @@ void QWidget::changeEvent(QEvent * event)
|
||||
switch(event->type()) {
|
||||
case QEvent::EnabledChange: {
|
||||
update();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessible::State s;
|
||||
s.disabled = true;
|
||||
QAccessibleStateChangeEvent event(this, s);
|
||||
@ -11515,7 +11515,7 @@ QString QWidget::whatsThis() const
|
||||
}
|
||||
#endif // QT_CONFIG(whatsthis)
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
/*!
|
||||
\property QWidget::accessibleName
|
||||
|
||||
@ -11580,7 +11580,7 @@ QString QWidget::accessibleDescription() const
|
||||
Q_D(const QWidget);
|
||||
return d->accessibleDescription;
|
||||
}
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
#ifndef QT_NO_SHORTCUT
|
||||
/*!
|
||||
|
@ -161,7 +161,7 @@ class Q_WIDGETS_EXPORT QWidget : public QObject, public QPaintDevice
|
||||
#if QT_CONFIG(whatsthis)
|
||||
Q_PROPERTY(QString whatsThis READ whatsThis WRITE setWhatsThis)
|
||||
#endif
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
Q_PROPERTY(QString accessibleName READ accessibleName WRITE setAccessibleName)
|
||||
Q_PROPERTY(QString accessibleDescription READ accessibleDescription WRITE setAccessibleDescription)
|
||||
#endif
|
||||
@ -396,7 +396,7 @@ public:
|
||||
void setWhatsThis(const QString &);
|
||||
QString whatsThis() const;
|
||||
#endif
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QString accessibleName() const;
|
||||
void setAccessibleName(const QString &name);
|
||||
QString accessibleDescription() const;
|
||||
|
@ -657,7 +657,7 @@ public:
|
||||
#if QT_CONFIG(whatsthis)
|
||||
QString whatsThis;
|
||||
#endif
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QString accessibleName;
|
||||
QString accessibleDescription;
|
||||
#endif
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include "private/qwidget_p.h"
|
||||
#include "private/qapplication_p.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <QtGui/qaccessible.h>
|
||||
#endif
|
||||
#include <private/qwidgetrepaintmanager_p.h>
|
||||
@ -136,7 +136,7 @@ QWidgetWindow::~QWidgetWindow()
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleInterface *QWidgetWindow::accessibleRoot() const
|
||||
{
|
||||
if (m_widget)
|
||||
@ -211,7 +211,7 @@ bool QWidgetWindow::event(QEvent *event)
|
||||
handleFocusInEvent(static_cast<QFocusEvent *>(event));
|
||||
Q_FALLTHROUGH();
|
||||
case QEvent::FocusOut: {
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessible::State state;
|
||||
state.active = true;
|
||||
QAccessibleStateChangeEvent ev(m_widget, state);
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
~QWidgetWindow();
|
||||
|
||||
QWidget *widget() const { return m_widget; }
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleInterface *accessibleRoot() const override;
|
||||
#endif
|
||||
|
||||
|
@ -89,7 +89,7 @@ Q_WIDGETS_EXPORT qreal dpiScaled(qreal value, const QStyleOption *option)
|
||||
return dpiScaled(value, dpi(option));
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
bool isInstanceOf(QObject *obj, QAccessible::Role role)
|
||||
{
|
||||
bool match = false;
|
||||
@ -110,7 +110,7 @@ bool hasAncestor(QObject *obj, QAccessible::Role role)
|
||||
}
|
||||
return found;
|
||||
}
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
|
||||
#if QT_CONFIG(dial)
|
||||
|
@ -56,7 +56,7 @@ namespace QStyleHelper
|
||||
Q_WIDGETS_EXPORT void drawBorderPixmap(const QPixmap &pixmap, QPainter *painter, const QRect &rect,
|
||||
int left = 0, int top = 0, int right = 0,
|
||||
int bottom = 0);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
Q_WIDGETS_EXPORT bool isInstanceOf(QObject *obj, QAccessible::Role role);
|
||||
Q_WIDGETS_EXPORT bool hasAncestor(QObject *obj, QAccessible::Role role);
|
||||
#endif
|
||||
|
@ -571,12 +571,12 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (!ret && opt && opt->type == QStyleOption::SO_MenuItem
|
||||
&& QStyleHelper::isInstanceOf(opt->styleObject, QAccessible::MenuItem)
|
||||
&& opt->styleObject->property("_q_showUnderlined").toBool())
|
||||
ret = 1;
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
break;
|
||||
}
|
||||
#endif // Q_OS_WIN
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "qpainter.h"
|
||||
#include "qapplication.h"
|
||||
#include "qstyle.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#include <qpa/qplatformtheme.h>
|
||||
@ -490,7 +490,7 @@ void QAbstractButton::setText(const QString &text)
|
||||
d->sizeHint = QSize();
|
||||
update();
|
||||
updateGeometry();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleEvent event(this, QAccessible::NameChanged);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -614,7 +614,7 @@ void QAbstractButton::setChecked(bool checked)
|
||||
d->emitToggled(checked);
|
||||
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessible::State s;
|
||||
s.checked = true;
|
||||
QAccessibleStateChangeEvent event(this, s);
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include "qevent.h"
|
||||
#include "qabstractslider_p.h"
|
||||
#include "qdebug.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#include <limits.h>
|
||||
@ -504,7 +504,7 @@ void QAbstractSlider::setValue(int value)
|
||||
if (d->pressed)
|
||||
emit sliderMoved((d->position = value));
|
||||
}
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleValueChangeEvent event(this, d->value);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <qpalette.h>
|
||||
#include <qstylepainter.h>
|
||||
#include <qdebug.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
# include <qaccessible.h>
|
||||
#endif
|
||||
|
||||
@ -1020,7 +1020,7 @@ void QAbstractSpinBox::keyPressEvent(QKeyEvent *event)
|
||||
d->updateState(up, true);
|
||||
}
|
||||
}
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleValueChangeEvent event(this, d->value);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -1651,7 +1651,7 @@ void QAbstractSpinBoxPrivate::updateState(bool up, bool fromKeyboard /* = false
|
||||
steps *= 10;
|
||||
q->stepBy(steps);
|
||||
spinClickThresholdTimerId = q->startTimer(spinClickThresholdTimerInterval);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleValueChangeEvent event(q, value);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "qstyle.h"
|
||||
#include "qstyleoption.h"
|
||||
#include "qevent.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
|
||||
@ -211,7 +211,7 @@ Qt::CheckState QCheckBox::checkState() const
|
||||
void QCheckBox::setCheckState(Qt::CheckState state)
|
||||
{
|
||||
Q_D(QCheckBox);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
bool noChange = d->noChange;
|
||||
#endif
|
||||
if (state == Qt::PartiallyChecked) {
|
||||
@ -229,7 +229,7 @@ void QCheckBox::setCheckState(Qt::CheckState state)
|
||||
emit stateChanged(state);
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (noChange != d->noChange) {
|
||||
QAccessible::State s;
|
||||
s.checkStateMixed = true;
|
||||
|
@ -45,7 +45,7 @@
|
||||
# include <private/qeffects_p.h>
|
||||
#endif
|
||||
#include <private/qstyle_p.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
|
||||
@ -1082,7 +1082,7 @@ void QComboBoxPrivate::_q_dataChanged(const QModelIndex &topLeft, const QModelIn
|
||||
emit q->currentTextChanged(text);
|
||||
}
|
||||
q->update();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleValueChangeEvent event(q, text);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -1385,7 +1385,7 @@ void QComboBoxPrivate::_q_emitCurrentIndexChanged(const QModelIndex &index)
|
||||
// signal lineEdit.textChanged already connected to signal currentTextChanged, so don't emit double here
|
||||
if (!lineEdit)
|
||||
emit q->currentTextChanged(text);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleValueChangeEvent event(q, text);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -2867,7 +2867,7 @@ void QComboBox::clear()
|
||||
{
|
||||
Q_D(QComboBox);
|
||||
d->model->removeRows(0, d->model->rowCount(d->root), d->root);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleValueChangeEvent event(this, QString());
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -2881,7 +2881,7 @@ void QComboBox::clearEditText()
|
||||
Q_D(QComboBox);
|
||||
if (d->lineEdit)
|
||||
d->lineEdit->clear();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleValueChangeEvent event(this, QString());
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -2895,7 +2895,7 @@ void QComboBox::setEditText(const QString &text)
|
||||
Q_D(QComboBox);
|
||||
if (d->lineEdit)
|
||||
d->lineEdit->setText(text);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleValueChangeEvent event(this, text);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <qslider.h>
|
||||
#include <private/qabstractslider_p.h>
|
||||
#include <private/qmath_p.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#include <qmath.h>
|
||||
|
@ -708,7 +708,7 @@ void QDockWidgetPrivate::updateButtons()
|
||||
= qobject_cast<QAbstractButton*>(dwLayout->widgetForRole(QDockWidgetLayout::FloatButton));
|
||||
button->setIcon(q->style()->standardIcon(QStyle::SP_TitleBarNormalButton, &opt, q));
|
||||
button->setVisible(canFloat && !hideButtons);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
//: Accessible name for button undocking a dock widget (floating state)
|
||||
button->setAccessibleName(QDockWidget::tr("Float"));
|
||||
button->setAccessibleDescription(QDockWidget::tr("Undocks and re-attaches the dock widget"));
|
||||
@ -717,7 +717,7 @@ void QDockWidgetPrivate::updateButtons()
|
||||
= qobject_cast <QAbstractButton*>(dwLayout->widgetForRole(QDockWidgetLayout::CloseButton));
|
||||
button->setIcon(q->style()->standardIcon(QStyle::SP_TitleBarCloseButton, &opt, q));
|
||||
button->setVisible(canClose && !hideButtons);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
//: Accessible name for button closing a dock widget
|
||||
button->setAccessibleName(QDockWidget::tr("Close"));
|
||||
button->setAccessibleDescription(QDockWidget::tr("Closes the dock widget"));
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "qstyle.h"
|
||||
#include "qstyleoption.h"
|
||||
#include "qstylepainter.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#include <private/qwidget_p.h>
|
||||
@ -200,7 +200,7 @@ void QGroupBox::setTitle(const QString &title)
|
||||
|
||||
update();
|
||||
updateGeometry();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleEvent event(this, QAccessible::NameChanged);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -609,7 +609,7 @@ void QGroupBox::setChecked(bool b)
|
||||
update();
|
||||
d->checked = b;
|
||||
d->_q_setChildrenEnabled(b);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessible::State st;
|
||||
st.checked = true;
|
||||
QAccessibleStateChangeEvent e(this, st);
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "private/qstylesheetstyle_p.h"
|
||||
#include <qmath.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <qaccessible.h>
|
||||
#endif
|
||||
|
||||
@ -304,7 +304,7 @@ void QLabel::setText(const QString &text)
|
||||
|
||||
d->updateLabel();
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (accessibleName().isEmpty()) {
|
||||
QAccessibleEvent event(this, QAccessible::NameChanged);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
|
@ -35,7 +35,7 @@
|
||||
#endif
|
||||
#include <private/qwidgettextcontrol_p.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#if QT_CONFIG(itemviews)
|
||||
@ -1341,7 +1341,7 @@ void QLineEdit::setReadOnly(bool enable)
|
||||
QEvent event(QEvent::ReadOnlyChange);
|
||||
QCoreApplication::sendEvent(this, &event);
|
||||
update();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessible::State changedState;
|
||||
changedState.readOnly = true;
|
||||
QAccessibleStateChangeEvent ev(this, changedState);
|
||||
|
@ -15,7 +15,7 @@
|
||||
# include "qwidgetaction.h"
|
||||
#endif
|
||||
#include "qclipboard.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#ifndef QT_NO_IM
|
||||
@ -143,7 +143,7 @@ void QLineEditPrivate::_q_selectionChanged()
|
||||
}
|
||||
|
||||
emit q->selectionChanged();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleTextSelectionEvent ev(q, control->selectionStart(), control->selectionEnd());
|
||||
ev.setCursorPosition(control->cursorPosition());
|
||||
QAccessible::updateAccessibility(&ev);
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "qpainter.h"
|
||||
#include <qpa/qplatformtheme.h>
|
||||
#include "qapplication.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
# include "qaccessible.h"
|
||||
#endif
|
||||
#if QT_CONFIG(effects)
|
||||
@ -1462,7 +1462,7 @@ void QMenuPrivate::activateAction(QAction *action, QAction::ActionEvent action_e
|
||||
|
||||
|
||||
if (action_e == QAction::Hover) {
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
int actionIndex = indexOf(action);
|
||||
QAccessibleEvent focusEvent(q, QAccessible::Focus);
|
||||
@ -2540,7 +2540,7 @@ void QMenuPrivate::popup(const QPoint &p, QAction *atAction, PositionFunction po
|
||||
q->show();
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleEvent event(q, QAccessible::PopupMenuStart);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -2669,7 +2669,7 @@ void QMenu::hideEvent(QHideEvent *)
|
||||
if (d->eventLoop)
|
||||
d->eventLoop->exit();
|
||||
d->setCurrentAction(nullptr);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleEvent event(this, QAccessible::PopupMenuEnd);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <qstyle.h>
|
||||
#include <qlayout.h>
|
||||
#include <qapplication.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
# include <qaccessible.h>
|
||||
#endif
|
||||
#include <qpainter.h>
|
||||
@ -495,14 +495,14 @@ void QMenuBarPrivate::_q_actionHovered()
|
||||
Q_Q(QMenuBar);
|
||||
if (QAction *action = qobject_cast<QAction *>(q->sender())) {
|
||||
emit q->hovered(action);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
int actionIndex = actions.indexOf(action);
|
||||
QAccessibleEvent focusEvent(q, QAccessible::Focus);
|
||||
focusEvent.setChild(actionIndex);
|
||||
QAccessible::updateAccessibility(&focusEvent);
|
||||
}
|
||||
#endif //QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ void QPlainTextEditPrivate::_q_cursorPositionChanged()
|
||||
{
|
||||
pageUpDownLastCursorYIsValid = false;
|
||||
Q_Q(QPlainTextEdit);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleTextCursorEvent ev(q, q->textCursor().position());
|
||||
QAccessible::updateAccessibility(&ev);
|
||||
#endif
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <qstylepainter.h>
|
||||
#include <qstyleoption.h>
|
||||
#include <private/qwidget_p.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <qaccessible.h>
|
||||
#endif
|
||||
#include <limits.h>
|
||||
@ -283,7 +283,7 @@ void QProgressBar::setValue(int value)
|
||||
return;
|
||||
d->value = value;
|
||||
emit valueChanged(value);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (isVisible()) {
|
||||
QAccessibleValueChangeEvent event(this, value);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "qdialogbuttonbox.h"
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
|
||||
@ -334,7 +334,7 @@ void QPushButton::setDefault(bool enable)
|
||||
}
|
||||
#endif
|
||||
update();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessible::State s;
|
||||
s.defaultButton = true;
|
||||
QAccessibleStateChangeEvent event(this, s);
|
||||
|
@ -14,7 +14,7 @@
|
||||
#endif
|
||||
#include <QtCore/qelapsedtimer.h>
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#include <limits.h>
|
||||
|
@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#include "qslider.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#include "qapplication.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "qmainwindow.h"
|
||||
#endif
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
|
||||
@ -583,7 +583,7 @@ void QStatusBar::hideOrShow()
|
||||
|
||||
emit messageChanged(d->tempItem);
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
QAccessibleEvent event(this, QAccessible::NameChanged);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "qwhatsthis.h"
|
||||
#endif
|
||||
#include "private/qtextengine_p.h"
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
#ifdef Q_OS_MACOS
|
||||
@ -390,7 +390,7 @@ void QTabBarPrivate::init()
|
||||
#endif
|
||||
q->setFocusPolicy(Qt::TabFocus);
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
leftB->setAccessibleName(QTabBar::tr("Scroll Left"));
|
||||
rightB->setAccessibleName(QTabBar::tr("Scroll Right"));
|
||||
#endif
|
||||
@ -1416,7 +1416,7 @@ void QTabBar::setCurrentIndex(int index)
|
||||
d->layoutTab(oldIndex);
|
||||
}
|
||||
d->layoutTab(index);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (QAccessible::isActive()) {
|
||||
if (hasFocus()) {
|
||||
QAccessibleEvent focusEvent(this, QAccessible::Focus);
|
||||
@ -2803,7 +2803,7 @@ QWidget *QTabBar::tabButton(int index, ButtonPosition position) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
/*!
|
||||
Sets the accessibleName of the tab at position \a index to \a name.
|
||||
*/
|
||||
@ -2829,7 +2829,7 @@ QString QTabBar::accessibleTabName(int index) const
|
||||
return tab->accessibleName;
|
||||
return QString();
|
||||
}
|
||||
#endif // QT_NO_ACCESSIBILITY
|
||||
#endif // QT_CONFIG(accessibility)
|
||||
|
||||
CloseButton::CloseButton(QWidget *parent)
|
||||
: QAbstractButton(parent)
|
||||
|
@ -140,7 +140,7 @@ public:
|
||||
bool changeCurrentOnDrag() const;
|
||||
void setChangeCurrentOnDrag(bool change);
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QString accessibleTabName(int index) const;
|
||||
void setAccessibleTabName(int index, const QString &name);
|
||||
#endif
|
||||
@ -179,7 +179,7 @@ protected:
|
||||
void timerEvent(QTimerEvent *event) override;
|
||||
virtual void initStyleOption(QStyleOptionTab *option, int tabIndex) const;
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
friend class QAccessibleTabBar;
|
||||
#endif
|
||||
private:
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
#if QT_CONFIG(whatsthis)
|
||||
QString whatsThis;
|
||||
#endif
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QString accessibleName;
|
||||
#endif
|
||||
QIcon icon;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#endif
|
||||
#include <qstyle.h>
|
||||
#include <qtimer.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include <qaccessible.h>
|
||||
#endif
|
||||
#include "private/qtextdocumentlayout_p.h"
|
||||
@ -192,7 +192,7 @@ void QTextEditPrivate::_q_cursorPositionChanged()
|
||||
{
|
||||
Q_Q(QTextEdit);
|
||||
emit q->cursorPositionChanged();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleTextCursorEvent event(q, q->textCursor().position());
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
|
@ -13,7 +13,7 @@
|
||||
#endif
|
||||
#include <qpa/qplatformtheme.h>
|
||||
#include <qstylehints.h>
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
#include "qaccessible.h"
|
||||
#endif
|
||||
|
||||
@ -749,7 +749,7 @@ void QWidgetLineControl::internalSetText(const QString &txt, int pos, bool edite
|
||||
m_textDirty = (oldText != m_text);
|
||||
const bool changed = finishChange(-1, true, edited);
|
||||
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (changed) {
|
||||
if (oldText.isEmpty()) {
|
||||
QAccessibleTextInsertEvent event(accessibleObject(), 0, txt);
|
||||
@ -819,7 +819,7 @@ void QWidgetLineControl::internalInsert(const QString &s)
|
||||
QString ms = maskString(m_cursor, s);
|
||||
if (ms.isEmpty() && !s.isEmpty())
|
||||
emit inputRejected();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleTextInsertEvent insertEvent(accessibleObject(), m_cursor, ms);
|
||||
QAccessible::updateAccessibility(&insertEvent);
|
||||
#endif
|
||||
@ -831,14 +831,14 @@ void QWidgetLineControl::internalInsert(const QString &s)
|
||||
m_cursor += ms.length();
|
||||
m_cursor = nextMaskBlank(m_cursor);
|
||||
m_textDirty = true;
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleTextCursorEvent event(accessibleObject(), m_cursor);
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
} else {
|
||||
int remaining = m_maxLength - m_text.length();
|
||||
if (remaining != 0) {
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleTextInsertEvent insertEvent(accessibleObject(), m_cursor, s);
|
||||
QAccessible::updateAccessibility(&insertEvent);
|
||||
#endif
|
||||
@ -871,7 +871,7 @@ void QWidgetLineControl::internalDelete(bool wasBackspace)
|
||||
addCommand(Command(SetSelection, m_cursor, u'\0', m_selstart, m_selend));
|
||||
addCommand(Command((CommandType)((m_maskData ? 2 : 0) + (wasBackspace ? Remove : Delete)),
|
||||
m_cursor, m_text.at(m_cursor), -1, -1));
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleTextRemoveEvent event(accessibleObject(), m_cursor, m_text.at(m_cursor));
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -912,7 +912,7 @@ void QWidgetLineControl::removeSelectedText()
|
||||
for (i = m_selend-1; i >= m_selstart; --i)
|
||||
addCommand (Command(RemoveSelection, i, m_text.at(i), -1, -1));
|
||||
}
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
QAccessibleTextRemoveEvent event(accessibleObject(), m_selstart, m_text.mid(m_selstart, m_selend - m_selstart));
|
||||
QAccessible::updateAccessibility(&event);
|
||||
#endif
|
||||
@ -1397,7 +1397,7 @@ void QWidgetLineControl::emitCursorPositionChanged()
|
||||
const int oldLast = m_lastCursorPos;
|
||||
m_lastCursorPos = m_cursor;
|
||||
cursorPositionChanged(oldLast, m_cursor);
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
// otherwise we send a selection update which includes the cursor
|
||||
if (!hasSelectedText()) {
|
||||
QAccessibleTextCursorEvent event(accessibleObject(), m_cursor);
|
||||
|
@ -578,7 +578,7 @@ void QWidgetTextControlPrivate::selectionChanged(bool forceEmitSelectionChanged
|
||||
Q_Q(QWidgetTextControl);
|
||||
if (forceEmitSelectionChanged) {
|
||||
emit q->selectionChanged();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (q->parent() && q->parent()->isWidgetType()) {
|
||||
QAccessibleTextSelectionEvent ev(q->parent(), cursor.anchor(), cursor.position());
|
||||
QAccessible::updateAccessibility(&ev);
|
||||
@ -601,7 +601,7 @@ void QWidgetTextControlPrivate::selectionChanged(bool forceEmitSelectionChanged
|
||||
&& (cursor.position() != lastSelectionPosition
|
||||
|| cursor.anchor() != lastSelectionAnchor)))) {
|
||||
emit q->selectionChanged();
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
if (q->parent() && q->parent()->isWidgetType()) {
|
||||
QAccessibleTextSelectionEvent ev(q->parent(), cursor.anchor(), cursor.position());
|
||||
QAccessible::updateAccessibility(&ev);
|
||||
@ -642,7 +642,7 @@ void QWidgetTextControlPrivate::_q_emitCursorPosChanged(const QTextCursor &someC
|
||||
|
||||
void QWidgetTextControlPrivate::_q_contentsChanged(int from, int charsRemoved, int charsAdded)
|
||||
{
|
||||
#ifndef QT_NO_ACCESSIBILITY
|
||||
#if QT_CONFIG(accessibility)
|
||||
Q_Q(QWidgetTextControl);
|
||||
|
||||
if (QAccessible::isActive() && q->parent() && q->parent()->isWidgetType()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user