From c531fcc92eeae600732d8e9fb63b70889322c018 Mon Sep 17 00:00:00 2001 From: Jan-Arve Saether Date: Fri, 2 Mar 2012 16:06:04 +0100 Subject: Improve debugging in the windows accessibility bridge. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit set QT_DEBUG_ACCESSIBILITY=(1|0) to turn logging on or off Change-Id: Ibd5b77699decf0cf02bc6b6cc656fa237de29124 Reviewed-by: Jan-Arve Sæther Reviewed-by: Frederik Gladhorn --- src/gui/accessible/qaccessible.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/gui/accessible') diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index 37e7a1dbb4..f256480dc8 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -1198,11 +1198,23 @@ Q_GUI_EXPORT QDebug operator<<(QDebug d, const QAccessibleInterface *iface) if (iface->object()) { d << "obj=" << iface->object(); } - if (iface->state().invisible) { - d << "invisible"; - } else { + QStringList stateStrings; + QAccessible::State st = iface->state(); + if (st.focusable) + stateStrings << QLatin1String("focusable"); + if (st.focused) + stateStrings << QLatin1String("focused"); + if (st.selected) + stateStrings << QLatin1String("selected"); + if (st.invisible) + stateStrings << QLatin1String("invisible"); + + if (!stateStrings.isEmpty()) + d << stateStrings.join(QLatin1String("|")); + + if (!st.invisible) d << "rect=" << iface->rect(); - } + } else { d << " invalid"; } -- cgit v1.2.3 From 15e136d4e116c1513c106dfbb75e1953a7f3463c Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Fri, 2 Mar 2012 19:38:12 +0100 Subject: Mark overload of QAccessible::updateAccessibility as deprecated. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updateAccessibility(const QAccessibleEvent &event) should be used, updateAccessibility(QObject *object, int child, Event reason) is deprecated. Change-Id: I92b32579ff202681189e9581365d2891e5d1e994 Reviewed-by: Jan-Arve Sæther --- src/gui/accessible/qaccessible.cpp | 2 -- src/gui/accessible/qaccessible.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src/gui/accessible') diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index f256480dc8..b7e9275669 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -650,8 +650,6 @@ void QAccessible::updateAccessibility(QObject *object, int child, Event reason) { Q_ASSERT(object); - qWarning("QAccessible::updateAccessibility is deprecated."); - QAccessibleEvent event = QAccessibleEvent(reason, object, child); updateAccessibility(event); } diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h index a72b91a90f..6ad1bb9da9 100644 --- a/src/gui/accessible/qaccessible.h +++ b/src/gui/accessible/qaccessible.h @@ -336,7 +336,7 @@ public: static QAccessibleInterface *queryAccessibleInterface(QObject *); - static void updateAccessibility(QObject *object, int child, Event reason); + QT_DEPRECATED static void updateAccessibility(QObject *object, int child, Event reason); static void updateAccessibility(const QAccessibleEvent &event); static bool isActive(); -- cgit v1.2.3 From 95d83cb1b68cc4a415d5d80859b4e74472ad7112 Mon Sep 17 00:00:00 2001 From: Casper van Donderen Date: Thu, 1 Mar 2012 15:28:31 +0100 Subject: Remove the usage of deprecated qdoc macros. QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns Reviewed-by: Lars Knoll --- src/gui/accessible/qaccessible.cpp | 10 +++++----- src/gui/accessible/qaccessible2.cpp | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/gui/accessible') diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index b7e9275669..aa47616161 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -77,10 +77,10 @@ QT_BEGIN_NAMESPACE braille displays. Clients and servers communicate in the following way: \list - \o \e{AT Servers} notify the clients about events through calls to the + \li \e{AT Servers} notify the clients about events through calls to the updateAccessibility() function. - \o \e{AT Clients} request information about the objects in the server. + \li \e{AT Clients} request information about the objects in the server. The QAccessibleInterface class is the core interface, and encapsulates this information in a pure virtual API. Implementations of the interface are provided by Qt through the queryAccessibleInterface() API. @@ -748,12 +748,12 @@ QAccessibleInterface *QAccessibleEvent::accessibleInterface() const The AT client uses three basic concepts to acquire information about any accessible object in an application: \list - \i \e Properties The client can read information about + \li \e Properties The client can read information about accessible objects. In some cases the client can also modify these properties; such as text in a line edit. - \i \e Actions The client can invoke actions like pressing a button + \li \e Actions The client can invoke actions like pressing a button or . - \i \e{Relationships and Navigation} The client can traverse from one + \li \e{Relationships and Navigation} The client can traverse from one accessible object to another, using the relationships between objects. \endlist diff --git a/src/gui/accessible/qaccessible2.cpp b/src/gui/accessible/qaccessible2.cpp index db3028b371..d3dafb8820 100644 --- a/src/gui/accessible/qaccessible2.cpp +++ b/src/gui/accessible/qaccessible2.cpp @@ -371,14 +371,14 @@ QT_BEGIN_NAMESPACE In general you should use one of the predefined action names, unless describing an action that does not fit these: \table - \header \o Action name \o Description - \row \o \l checkAction() \o checks the item (checkbox, radio button, ...) - \row \o \l decreaseAction() \o decrease the value of the accessible (e.g. spinbox) - \row \o \l increaseAction() \o increase the value of the accessible (e.g. spinbox) - \row \o \l pressAction() \o press or click or activate the accessible (should correspont to clicking the object with the mouse) - \row \o \l setFocusAction() \o set the focus to this accessible - \row \o \l showMenuAction() \o show a context menu, corresponds to right-clicks - \row \o \l uncheckAction() \o uncheck the item (checkbox, radio button, ...) + \header \li Action name \li Description + \row \li \l checkAction() \li checks the item (checkbox, radio button, ...) + \row \li \l decreaseAction() \li decrease the value of the accessible (e.g. spinbox) + \row \li \l increaseAction() \li increase the value of the accessible (e.g. spinbox) + \row \li \l pressAction() \li press or click or activate the accessible (should correspont to clicking the object with the mouse) + \row \li \l setFocusAction() \li set the focus to this accessible + \row \li \l showMenuAction() \li show a context menu, corresponds to right-clicks + \row \li \l uncheckAction() \li uncheck the item (checkbox, radio button, ...) \endtable In order to invoke the action, \l doAction() is called with an action name. -- cgit v1.2.3 From f449cefc27fc321f96aadbcb0f0a46e6f7a2b0b4 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Sun, 12 Feb 2012 12:35:12 +0100 Subject: Remove AccessibilityPrepare event. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This event was completely unused. In addition it leads to crashes on linux when sending the Destroy accessibility update. The Destroy event on linux would still query an accessible interface. That in turn would trigger the event to be sent. Change-Id: I8915527de067b8b70ba41b1361e3ef5d12866d7d Reviewed-by: Frederik Gladhorn Reviewed-by: Jan-Arve Sæther --- src/gui/accessible/qaccessible.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/gui/accessible') diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index aa47616161..e5b290ae1f 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -571,10 +571,6 @@ QAccessibleInterface *QAccessible::queryAccessibleInterface(QObject *object) if (!object) return 0; - QEvent e(QEvent::AccessibilityPrepare); - - QCoreApplication::sendEvent(object, &e); - const QMetaObject *mo = object->metaObject(); while (mo) { const QLatin1String cn(mo->className()); -- cgit v1.2.3