summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/linuxaccessibility
Commit message (Collapse)AuthorAgeFilesLines
* Let platform plugin decide if accessibility is activeFrederik Gladhorn2013-04-194-35/+27
| | | | | Change-Id: I881a8ff3fedf3db73ee37046a4363c70960a92a6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Make QTextCursor accessibility boundary finder availableFrederik Gladhorn2013-04-082-8/+8
| | | | | | | | | This allows re-using the function in QtQuick. In addition TextBoundaryType is moved to QAccessible and QAccessible2 as namespace ceases to exist. Change-Id: I184bc2c181a22ca51ac4db4e5a080dc26d4acfe0 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Cache QAccessibleInterfaces.Frederik Gladhorn2013-04-022-173/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since there already is a one-to-one relationship between QObject and QAccessibleInterface it makes little sense to create and destroy the interfaces on each call to queryAccessibleInterface. Add a cache and keep created interfaces around for the lifetime of the corresponding QObject. This changes the memory management rules: accessible interfaces must no longer be deleted. If you get an QAccessibleIntrface pointer that pointer will stay valid as long as the corresponding QObject is not deleted. This also re-enables accessibility for Mac. We limit the range of the IDs so that they are useable for Windows directly. That means we can get rid of the event cache there. This is based on: Iebf2f374916fc70a9dd29e95f45a6444b85f6cee Change-Id: I9fe6531812c0dbc5b41101ac05830a6dd75e13a3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Accessibility: Fix crash when updating in dtorFrederik Gladhorn2013-03-231-2/+6
| | | | | | | | | | | | | | This happens for example when running several tests. Widgets in destructor should be treated as invalid since their window pointer and other properties are no longer valid. When deleting a window containing only a table view there would be a table model reset update comming from the window being destroyed. Change-Id: Ia387c814333ce373fe132b189fc180787e36cdd5 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Make qaccessible2.h internal.Frederik Gladhorn2013-03-141-1/+1
| | | | | | | | | | | This should have been done right from the start, instead we only made the documentation internal. Also remove the classes from the BIC data. Change-Id: I238a7a7cc5d26980b23931c78e7e5a4477d46920 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-062-7/+10
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/qnx/qqnxscreen.cpp src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: Ib64f21c077b54f2291d19187590bfe869b98477a
| * Fix potential crash in accessibility key event handlingFrederik Gladhorn2013-03-062-7/+10
| | | | | | | | | | Change-Id: Id3eec6c83d7f8ece186e6b5bc02771c00893294b Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-03-051-12/+53
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/mac/pbuilder_pbx.cpp src/corelib/kernel/qtimerinfo_unix.cpp src/plugins/platforms/cocoa/qcocoabackingstore.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/windows/qwindowswindow.cpp src/plugins/platforms/xcb/qglxintegration.cpp Change-Id: I8d125fe498f5304874e6976b53f588d3e98a66ac
| * Remove debug output that can cause crashes in static builds.Frederik Gladhorn2013-02-251-12/+53
| | | | | | | | | | | | | | | | | | | | Currently static builds ignore the accessibility plugins. The debug output would also potentially crash for other events when they could not create interfaces. Task-number: QTBUG-28707 Change-Id: I5ae20cac89bd7f4a74add2b80834f4e9d4fa438c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-142-81/+133
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/concurrent/doc/qtconcurrent.qdocconf src/corelib/doc/qtcore.qdocconf src/corelib/global/qglobal.h src/dbus/doc/qtdbus.qdocconf src/dbus/qdbusmessage.h src/gui/doc/qtgui.qdocconf src/gui/image/qimagereader.cpp src/network/doc/qtnetwork.qdocconf src/opengl/doc/qtopengl.qdocconf src/opengl/qgl.h src/plugins/platforms/windows/qwindowswindow.cpp src/printsupport/doc/qtprintsupport.qdocconf src/sql/doc/qtsql.qdocconf src/testlib/doc/qttestlib.qdocconf src/tools/qdoc/doc/config/qt-cpp-ignore.qdocconf src/widgets/doc/qtwidgets.qdocconf src/xml/doc/qtxml.qdocconf Change-Id: Ie9a1fa2cc44bec22a0b942e817a1095ca3414629
| * Add translator help for accessibility stringsFrederik Gladhorn2013-02-081-4/+68
| | | | | | | | | | | | | | | | | | | | | | There is also one string fix: cursor was twice, the second one should have been text caret. These roles follow IAccessible/MSAA as reference. Change-Id: I39b64fd01376fec9e8d9b743c43a24611a1d9fbd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Accessibility: Ignore TableModelChanges on Linux for now.Frederik Gladhorn2013-02-071-16/+4
| | | | | | | | | | | | | | | | | | This part will be improved in Qt 5.1. Currently it just spits out debug messages for unhandled events. Change-Id: I22475317ab54a8223d42536e1cee3f93a969e497 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
| * Check if the interface pointer is valid to avoid a potential crash.Jan Arve Saether2013-02-061-1/+1
| | | | | | | | | | Change-Id: I7e6634b799e551786d6cbc85e2d526b7874ada3d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * Fix lupdate-warnings in QSpiAccessibleBridge.Friedemann Kleint2013-02-051-64/+64
| | | | | | | | | | | | | | | | linuxaccessibility/bridge.cpp:169: tr() cannot be called without context Change-Id: Ib6bd4db7c4759818ccba8adff73617af7331f318 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-297-14/+0
|/ | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Disable only accessibility bridge without dbus on linuxFrederik Gladhorn2013-01-231-1/+1
| | | | | | | | | | | | Keeping accessibility and only disabling the bridge will enable more builds to work. Warning about disabling accessibility disabled is needed because in QStyle it is used to discover semantics about widgets (if a toolbutton is in a toolbar). Change-Id: Iae4e6ab63479743bdd70cba4b1954ec7cf3f88e9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility Linux: Make dbus registration asyncFrederik Gladhorn2013-01-226-88/+133
| | | | | | Change-Id: I74043be04f4ee17089353304fdc007a7f22cdea0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1814-14/+14
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Revert "Enable module build with QT_NO_ACCESSIBILITY"aavit2013-01-0413-51/+0
| | | | | | | | | | This reverts commit b7f63c6bf74a0eb62bb49c1085584da1b3714a06. It made compilation fail in qstylehelper_p.h if QT_NO_ACCESSIBILITY was defined - which it is by default on linux without dbus. Change-Id: I313f5138460d28c44dad128d175df0e53a99287d Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix GCC warning about parentheses in QtPlatformSupportThiago Macieira2013-01-021-1/+2
| | | | | | | atspiadaptor.cpp:2140:12: error: suggest explicit braces to avoid ambiguous 'else' [-Werror=parentheses] Change-Id: Ib21308f9c1b3bf813fed803228d8adbcc3ce7e9f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* add and use qtHaveModule() functionOswald Buddenhagen2012-12-211-1/+1
| | | | | | | | | | | this is much more elegant than the so far propagated !isEmpty(QT.foo.name). also replace feature-specific tests (no-gui and no-widgets) and the obsolete contains(QT_CONFIG, foo) syntax. Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Enable module build with QT_NO_ACCESSIBILITYTasuku Suzuki2012-12-2013-0/+51
| | | | | | Change-Id: I330c3ddd70232d94eae5543cb0282b962e67eae5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility Linux: Prevent access to invalid interfacesFrederik Gladhorn2012-12-181-5/+20
| | | | | | | | | | | Especially with the newer QML accessibility we can end up with events for objects that cannot instantiate a QAccessibleInterface. Let's not crash in that case. Change-Id: Ie5d38315f32d30540eb4adcb74a7b3bfa667f03f Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Do not inform that a widget is not visible when it's disabled.José Millán Soto2012-12-161-2/+0
| | | | | | Change-Id: I561c8ef4c25dde8eb24260a46d284ca10cbf074d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Handle disabled state changeJosé Millán Soto2012-12-161-0/+7
| | | | | | | | Modified AtSpiAdaptor::notify to handle enabling and disabling widgets. Change-Id: I9a23f74d891aaf123d7fc094bdf63e384e1d65fe Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Implemented AtSpiAdaptor::notifyStateChangeJosé Millán Soto2012-12-152-15/+15
| | | | | | | | | Adding a new private method to simplify notifying that the state has changed as it is something that is frequently done in AtSpiAdaptor::notify Change-Id: Idf21715b5d20212adb301ae9bca05f1edfc19946 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Add missing bit in initialization.Frederik Gladhorn2012-12-141-0/+1
| | | | | Change-Id: I1de8dcd8714f1700ac03d7c1e8536f10a031cef9 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessible: Improve value interfacev5.0.0-rc2Frederik Gladhorn2012-12-121-31/+21
| | | | | | | | | The stepSize property was missing in Qt 4 and is a sensible addition to the value interface. Change-Id: I7571800d50ee7e4194c09c4db40300809a1ce45a Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility Linux: Do not depend on external libatspi2Frederik Gladhorn2012-11-081-2/+0
| | | | | | | | | | | This has (and still does) caused lots of grief since it means accessibility was often unintendedly not built. Instead copy the lib-at-spi-2 header file needed for the type enum and build it by default again. Change-Id: I1ba26f20edff1aeb444c96a37928f36230ac7576 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Accessibility: make sure right objects are cached on linuxFrederik Gladhorn2012-10-271-1/+1
| | | | | | | | This patch goes together with 730a5a994ff46055055c58b25bd059373dddb934 and is the second code path that deals with the hash of valid objects. Change-Id: Ia7b0995cb667cfce5f7697aa61856e44f745a932 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Be more careful about asserting in accessibility.Frederik Gladhorn2012-10-271-1/+5
| | | | | | | | | | It is possible to call the accessibility update for any widget, even if it doesn't implement the right interfaces. While that is bad, warning about it is better than asserting. Change-Id: I23c0c783083f73fb816d75b2c9b78efd603edcb6 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Handle separators in menus in AT-SPI (Linux accessibility)José Millán Soto2012-10-191-2/+3
| | | | | Change-Id: Id9c109d53bbb8ded04bbe98a622d44e13d572340 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Clean up instantiation of mapping of AT-SPI roles.Frederik Gladhorn2012-10-191-66/+65
| | | | | Change-Id: If31b33f1b259f896408a66b0574d640b0ad57019 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: make sure right objects are cached on linuxFrederik Gladhorn2012-10-191-1/+1
| | | | | | | | | | | | | The linux test would actually fail because the qobjects created could end up having the same address (create-delete-create...). After an object is deleted, it's not instantly removed from the cache of valid objects. Instead it would stay in the list with it's smart pointer becoming zero. This patch adds the missing null pointer check so we are always up to date. Change-Id: Ia7be14741d4798c2b8e75cb7127298c73cf206ef Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix compile with -no-widgetsRohan McGovern2012-10-182-4/+3
| | | | | | | | | | | | Remove more unnecessary references to QtWidgets in accessibility implementation. Disable accessibility tests (which rely on QtWidgets) when QtWidgets is not available. Change-Id: I57315537779d31af1245d42d1b4c49174016da54 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility doesn't need QApp from QWidgets.Frederik Gladhorn2012-10-171-1/+1
| | | | | | Change-Id: I440179bfa95d6aa73c8b69b09431e4dc9fae5436 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Fix function names in warning messages.Frederik Gladhorn2012-10-161-7/+7
| | | | | Change-Id: I14abc176ea670799496e10bee296b4e84fdc7181 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Use QLatin1String in AtSpiAdaptor::applicationInterfaceJosé Millán Soto2012-10-151-4/+4
| | | | | | | Using QLatin1String in string constants which were not using it. Change-Id: I3aa4b7104cf3d1765874e0ee9a6fd23aadd8d671 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Accessibility: Implement GetVersion and GetLocale in app adaptor.Frederik Gladhorn2012-10-131-1/+10
| | | | | Change-Id: I73a49b22add9e268907025dd0bf7ec76e7fd0c0b Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add workaround for typo in libatspi VisualdataChangedFrederik Gladhorn2012-10-131-1/+2
| | | | | Change-Id: I6375d77fac4e743a372f18b3e3d63c128ce51271 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Remove trivial debug output from QSpiAccessibleBridgeJocelyn Turcotte2012-10-111-3/+1
| | | | | | | | This information can get noisy when windows get opened/closed frequently during auto tests. Change-Id: I2777b51c97b3108be3d784794e12e20985d4d65b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Do not handle invalid accessibles in atspi bridge.Frederik Gladhorn2012-10-101-0/+4
| | | | | | Change-Id: I13a7dd1e190c5d3a5bb8be0ee66c2f18d0d3a1b5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: For app claim support for app iface.Frederik Gladhorn2012-10-031-0/+2
| | | | | Change-Id: Idb7f5971d61885f18d827f6bff3994df7a3860e5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Implement action de-marshalling.Frederik Gladhorn2012-10-031-2/+5
| | | | | Change-Id: Ie9ae85298fad6217f9f50a018fbba50f028deba2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Make accessibility debug output optional.Frederik Gladhorn2012-10-033-56/+63
| | | | | | | | | On linux with the new plugin debug output was a bit too generous. Instead use environment var: If QT_DEBUG_ACCESSIBILITY is set, give the full a11y output. Change-Id: I1c9e2078e38799f91468cfc2d9ddcaa36ba4fa03 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Accessibility: rather than assert, just warn.Frederik Gladhorn2012-09-271-5/+7
| | | | | | | | | Screen readers do random things with the dbus interface, we should be careful when handling what they send. Change-Id: Ie8fc515c8d399dae9b5e892a135b54a1820d09e2 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2214-336/+336
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Correct QSpiAccessibleBridge::setRootObject definitionJosé Millán Soto2012-09-222-5/+3
| | | | | | | | | | | | | QSpiAccessibleBridge::setRootObject was defined to require a QAccessibleInterface* as parameter instead of QObject*, as a result of that, QSpiAccessibleBridge::setRootObject did not reimplement QPlatformAccessibility::setRootObject and the adaptor was not initialized. After this change, applications should work with screen readers. Change-Id: Iee3d39f8e0959c1d75b1e682847d266a723c141b Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Mark (non-public API's) ctor's as explicitSergio Ahumada2012-09-141-1/+1
| | | | | | | | | Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused file.Frederik Gladhorn2012-09-111-94/+0
| | | | | Change-Id: I402f1d3216129d693a4b0d33e015fd047c7d2298 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>