summaryrefslogtreecommitdiffstats
path: root/src/widgets/accessible
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-233-2/+24
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/wince80colibri-armv7-msvc2012/qmake.conf qmake/generators/win32/msvc_vcproj.cpp src/corelib/global/qnamespace.h src/corelib/global/qnamespace.qdoc src/corelib/io/qfsfileengine_win.cpp src/corelib/tools/tools.pri src/network/ssl/qsslconfiguration_p.h src/plugins/platforms/linuxfb/qlinuxfbscreen.cpp src/plugins/platforms/windows/windows.pri src/src.pro src/tools/bootstrap/bootstrap.pro src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/dialogs/qfilesystemmodel.cpp tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt Change-Id: I4d2ac78f0dcc97f008186bbbc769c6fe588ab0e5
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-193-2/+24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| | * QAccessibleMenuItem: Implement QAccessibleInterface::window().Friedemann Kleint2016-05-062-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | The window is required to be able to determine the correct scale factor for the screen when High DPI scaling is active. Change-Id: I8f776684396d055754093f62e0d33bd7e23cb52b Task-number: QTBUG-52943 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
| | * QAccessibleWidget: Retrieve window from native parent widget.Friedemann Kleint2016-05-061-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Query the native parent widget if the widget does not have a window handle. The window is required to be able to determine the correct scale factor for the screen when High DPI scaling is active. Change-Id: Ibaf5e8e7b07327ea635d2f726acea76c2c95bda3 Task-number: QTBUG-52943 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | QtBase: use printf-style qWarning/qDebug where possible (II)Marc Mutz2016-05-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The printf-style version of QDebug expands to a lot less code than the std::ostream-style version. Of course, you pay in type safety (but compilers warn about it these days), you cannot stream complex Qt types and streaming QStrings is awkward, but in many cases you actually improve on readability. But the main reason is that something that's not supposed to be executed under normal operation has no business bloating executable code size. This is not an attempt at converting all qWarnings() to printf-style, only the low-hanging fruit. In this second part, replace qWarning() << "" << non-QString with qWarning("..%.", non-QString). QString (and QUrl etc) have special escaping handling when streamed into QDebug, so leave those alone. They also seem to expand to less code than the qPrintable() alternative, so there's no reason to replace them. Saves 2KiB, 3.4KiB, ~750b and ~450b in text size in QtCore, Gui, Network and Widgets, resp., on optimized GCC 5.3 AMD64 builds. Change-Id: Iae6823e543544347e628ca1060d6d51e3b04d3f4 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | QTabBar: Add setAccessibleTabName() and accessibleTabName()Dongmei Wang2016-04-241-6/+18
|/ / | | | | | | | | | | | | | | | | | | | | Currently, a tab's text is used as its accessibleName. When a tab's text is empty, there is no API to set the tab's accessibleName. The two APIs are added to set and return the accessibleName property of a tab. Task-number: QTBUG-46530 Change-Id: Idf88b5f905fe66c6365ea0eeb650e74211db90e1 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-112-6/+13
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change partially reverts 1bfc7f68 about QT_HAS_BUILTIN define and undef in src/corelib/tools/qsimd_p.h. This change is also squashed with "Fall back to c++11 standard compiler flag for host builds" which is done by Peter Seiderer. Conflicts: mkspecs/features/default_post.prf src/3rdparty/sqlite/0001-Fixing-the-SQLite3-build-for-WEC2013-again.patch src/3rdparty/sqlite/sqlite3.c src/corelib/tools/qsimd_p.h src/gui/kernel/qevent.cpp src/gui/kernel/qwindowsysteminterface.cpp src/gui/kernel/qwindowsysteminterface_p.h src/plugins/bearer/blackberry/blackberry.pro src/plugins/platforms/cocoa/qcocoasystemsettings.mm src/plugins/platformthemes/gtk2/gtk2.pro src/plugins/styles/bb10style/bb10style.pro src/sql/drivers/sqlite2/qsql_sqlite2.cpp tools/configure/configureapp.cpp Task-number: QTBUG-51644 Done-with: Peter Seiderer <ps.report@gmx.net> Change-Id: I6100d6ace31b2e8d41a95f0b5d5ebf8f1fd88b44
| * consistently put {qt,qml}_{module,plugin} at the end of project filesOswald Buddenhagen2016-03-071-6/+4
| | | | | | | | | | | | | | | | this fixes static builds by ensuring that all dependencies are exported. Task-number: QTBUG-51071 Change-Id: Icbce502dcbcb4d4b4d922c42679f44e2cc930bf3 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
| * Don't create accessible interface for QWidgets being destroyedGabriel de Dietrich2016-03-021-0/+9
| | | | | | | | | | | | Change-Id: I975ee556913707e8595b2a89f1bba4299187bcfb Reviewed-by: Wayne Arnold <wayne.arnold@autodesk.com> Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * Revert "QWindow::destroy(): only reset QGuiApp::focus_window and friends as ↵Tor Arne Vestbø2016-02-021-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | a last resort" This reverts commit 4c71db756741d35ccb32dc4c32aa1823264c85df. It's too risky for 5.6, we should let it cook in dev for a while and backport when ready. Change-Id: I91e677e65d967f29c84a254cd3dffc8bb847b263 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
| * QWindow::destroy(): only reset QGuiApp::focus_window and friends as a last ↵Tor Arne Vestbø2016-01-291-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resort Resetting focus_window and other internal QGuiApplication variables before calling setVisible(false) and destroying the platform window means that the platform window can't reason about whether or not it was the focus window unless it can resolve that using native APIs. We should let the platform window take care of resetting the focus window and related states, and only execute our fallback logic if the plugin doesn't do the right thing. We also use QPA to update the state instead of modifying the internal QGuiApplication variables directly, so that events and signals are emitted as a result of the reset. The QLineEdit test gets two added calls to processEvents(), since assuming that activateWindow() is synchronous is not correct, and would result in the QMenu resetting the focus window to 0 on destroy. Task-number: QTBUG-46414 Change-Id: I562788393ed0ffd77d7a4be2279862322f721c1a Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-1516-224/+320
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Don't re-evaluate QTextCharFormat::font() all the time in ↵Marc Mutz2015-12-211-5/+7
| | | | | | | | | | | | | | | | | | | | QAccessibleTextWidget::attributes() Saves ~100b in text size. Change-Id: I144b8c1d02ce8a24f1654d54abad90ba1054be9a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Boris Dušek <me@dusek.me>
* | Remove a use of a QMap in QAccessibleTextWidget::attributes()Marc Mutz2015-12-211-7/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QMap<QByteArray, QString> was only used to hold key/value pairs until they were serialized into a QString at the end of the function. Serialize into QString directly instead, dropping the temporary QMap. The problem is that we'd like to keep the line formatting central while at the same time harnessing the power of QStringBuilder. This is possible with a templated function with an input/output parameter: format_attr(QString &result, const char *key, T &&value) format_attr(result, text-foo, str + str2 + str3); Or with return type deduction: formatted(const char *key, T &&value) -> decltype((expr)) { return expr; } result += formatted(text-foo, str + str2 + str3); I don't like out parameters, and we can't rely on auto return type deduction, yet, so I opted for a miniature expression template solution that can only match the expression attr[key] = value; where 'key' is a const char* and 'value' can be anything that QStringBuilder supports. This allows to keep the syntax of a map while at the same time serializing to QString immediately. The only behavioral difference to the old code is that the attributes are no longer sorted, but order doesn't matter. Saves more than 10KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I7b3bec0466ef24156c693adaa95f0316007e0bfe Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtWidgets: replace some index-based for loops with C++11 range-forMarc Mutz2015-12-163-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This needs to be handled a bit carefully, because Qt containers will detach upon being iteratoed over using range-for. In the cases of this patch, that cannot happen, because all containers are marked as const (either by this patch or before). Separate patches will deal with other situations. Apart from being more readable, range-for loops are also the most efficient for loop. This patch shaves almost 2K of text size off an optimized Linux AMD64 GCC 4.9 build. Change-Id: I53810c7b25420b4fd449d20c90c07503c5e76a66 Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | QtWidgets: use Q_UNLIKELY for every qWarning() (2)Marc Mutz2015-11-253-7/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | If, after checking a condition, we issue a qWarning(), by definition that check is unlikely to be true. Tell the compiler so it can move the error handling code out of the normal code path to increase the effective icache size. This change contains the changes to the accessible/, effects/, kernel/, styles/ and itemviews/ subdirs. Moved conditional code around where possible so that we could always use Q_UNLIKELY, instead of having to revert to Q_LIKELY here and there. In QWidgetPrivate::setWindowModified_helper(), as a drive-by, I swapped the evaluation order of an &&-expression (newly wrapped in Q_UNLIKELY) to be more readable and more efficient (cheaper check first) at the same time. In qDraw* (qdrawutil.cpp), simplified boolean expressions (sometimes by skipping re-checking conditions already checked in a previous guard clause). Change-Id: I58be22be0a33522c2629a66c2f6c795771a99f3f Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-0214-19/+85
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Do not install headers for private classesFrederik Gladhorn2015-09-0715-19/+96
| | | | | | | | | | | | | | | | | | | | When merging the accessibility plugin into the widgets library, the headers were just moved. They should have gotten the _p at that time. Task-number: QTBUG-47569 Change-Id: I0a2290dae3a8187596e9d7541ccf69beeb603296 Reviewed-by: Dimitar Dobrev Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix QAccessibleTextWidget::characterRect for off-cursor positionsBoris Dušek2015-03-251-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code retrieved the character format at position where the cursor currently was, irrespective of the position actually passed to the characterRect function. This is now fixed and we retrieve the character format for the QTextFragment containing the specified offset. This fixes display of visual bounds around text by screen reader in some cases. E.g. on OS X, when searching text using VoiceOver, VoiceOver first queries the visual bounds of the found text (and thus also characterRect), and only then it moves cursor position to the found text. If before the change of position the cursor was on some text with different metrics (i.e. a bigger font), the visual bounds for the found text reflected those metrics, not the metrics of the actual found text for which the bounds were drawn. This resulted in smaller/bigger rectangles around the found text than was actually correct. Change-Id: Ie2a4dfc714504b7923cdaf8ff875c438aeccddee Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * Fix QAccessibleTextWidget::characterRect for complex linesBoris Dušek2015-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | Current implementation of QAccessibleTextWidget::characterRect returned rect with correct vertical position only when the font point size did not vary inside the line. This commit makes it work for lines where point size changes by taking text ascent and descent into account. Change-Id: I4ee43701a30ce9bff1db2f2d0422227496c3df4c Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
| * Support all underline types in accessibilityBoris Dušek2015-03-251-1/+36
| | | | | | | | | | Change-Id: I9eccc66624f5d789cc8778d4376338207beb4a14 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Fix missing "We mean it" in qtbase private headersThiago Macieira2015-10-011-0/+11
| | | | | | | | | | Change-Id: I42e7ef1a481840699a8dffff1408dfd4fd9c8e32 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Fix inefficient code foreaching on container.values()Sérgio Martins2015-07-082-3/+3
| | | | | | | | | | | | | | Saves one full iteration and memory allocation. Change-Id: Ice527499b5f5f62bd1e47d76fdf40119948ee3a1 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QtWidgets: Use Q_NULLPTR instead of 0 in all public headersMarc Mutz2015-07-061-7/+7
| | | | | | | | | | | | | | | | | | This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: Ie67d235151ca8d4ef5e721c9cf4a6fd32bd167a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | widgets: Use QList::reserve(), reduces reallocations.Sérgio Martins2015-06-231-5/+11
| | | | | | | | | | Change-Id: I49cc03f365c77f142f62c8e77505ec09723a44d9 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Fix crash during autotest execution on Mac OS XLars Knoll2015-06-021-0/+3
| | | | | | | | | | Change-Id: Ib9cd6791a7b48a0cde9e6d991b2d7f6fb4020819 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Support "writing-mode" accessibility text attributeBoris Dušek2015-03-051-0/+3
| | | | | | | | | | Change-Id: Ib682b6f7828cfd42050bcb9c846fd8aeb7fdd05f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Fix QAccessibleTextWidget::characterRect for off-cursor positionsBoris Dušek2015-03-051-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code retrieved the character format at position where the cursor currently was, irrespective of the position actually passed to the characterRect function. This is now fixed and we retrieve the character format for the QTextFragment containing the specified offset. This fixes display of visual bounds around text by screen reader in some cases. E.g. on OS X, when searching text using VoiceOver, VoiceOver first queries the visual bounds of the found text (and thus also characterRect), and only then it moves cursor position to the found text. If before the change of position the cursor was on some text with different metrics (i.e. a bigger font), the visual bounds for the found text reflected those metrics, not the metrics of the actual found text for which the bounds were drawn. This resulted in smaller/bigger rectangles around the found text than was actually correct. Change-Id: If23b4b8492ec77f0f073fc5c25628b67b483724e Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Fix QAccessibleTextWidget::characterRect for complex linesBoris Dušek2015-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | Current implementation of QAccessibleTextWidget::characterRect returned rect with correct vertical position only when the font point size did not vary inside the line. This commit makes it work for lines where point size changes by taking text ascent and descent into account. Change-Id: I9684b4872566ddfa86dc7a2e9c803a1be0138000 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-02-251-8/+20
|\| | | | | | | Change-Id: Ie709286a14b452dae7abb59830f584bb33f1ccf5
| * Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-8/+20
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/xml/htmlinfo/simpleexample.html examples/xml/rsslisting/rsslisting.cpp qmake/generators/win32/msbuild_objectmodel.cpp src/3rdparty/harfbuzz-ng/src/hb-private.hh src/corelib/global/qlogging.cpp src/corelib/io/qstorageinfo_unix.cpp src/corelib/thread/qwaitcondition_unix.cpp src/gui/kernel/qguiapplication.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp src/testlib/doc/src/qt-webpages.qdoc tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: Ib272ff0bc30a1a5d51275eb3cd2f201dc82c11ff
| | * Fix crash in QAccessibleTextWidget::attributes()Jan Arve Saether2015-02-171-8/+20
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-44006 Change-Id: I79d7d84206a3e4abcd49c7c6e5e91b7c9c753dd6 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | | Support all underline types in accessibilityBoris Dušek2015-02-251-1/+36
|/ / | | | | | | | | Change-Id: I74684167eef13d407e94d3b9668077fe61553672 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Make QAccessibleTextWidget::attributes respect default document fontBoris Dušek2015-02-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | QTextFormat::font{Weight,PointSize}() etc. return the font trait explicitly set on the QTextFormat, while QTextFormat::font() returns font which also uses the QTextDocument::defaultFont() as a default for any font traits not explicitly set on the QTextFormat. Accessibility support for text attributes used the former, which was wrong; this commit fixes it to use the latter. Also includes tests to verify the fix. Change-Id: Iab7f2be1b68adaad847d1f29c9e5af2195416035 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Fix text-align justify in accessibility supportBoris Dušek2015-02-131-1/+1
| | | | | | | | | | Change-Id: If43be193d64d7df29eb3f89b6c528ee1e8de310f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-1116-112/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-032-18/+18
|/ | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Compile fix for QT_NO_TEXTHTMLPARSER in QtWidgetsJulien Brianceau2014-11-111-0/+2
| | | | | Change-Id: If67c851cf45ca53ac4af56d4dc36db24ea896ba1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Removing a few unneeded "? true : false"Alessandro Portale2014-10-091-1/+1
| | | | | | | Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Update license headers and add new license filesMatti Paaso2014-09-2416-288/+160
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* a11y: Make QAccessibleButton and friends resolve role dynamicallyTor Arne Vestbø2014-09-203-38/+49
| | | | | | | | | The role may changed based on the checkable state of the button, eg, so we need to resolve the role at runtime instead of hard-coding it in the constructor. Change-Id: I78faee08189c5510ca9964b07ad94bcf5d4fa11b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Improve accelerator stripping in accessible widgetsFrederik Gladhorn2014-09-043-7/+14
| | | | | | | | | | | When we strip the & we should also report the hotkey. In addition only strip labels when they are buddys and try not to remove ampersands from all kinds of random text. This fixes https://bugs.kde.org/show_bug.cgi?id=338282 Change-Id: I401281cd9ff43b23a3923ad9909ca9c469b59506 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: Improve line boundary helper functionsFrederik Gladhorn2014-09-041-6/+0
| | | | | | | | | These functions are supposed to make it easy for third parties (and QLineEdit) to implement the textAt/Before/AfterOffset functions. Before the functions were ignoring newlines completely and thus only somewhat useful. Change-Id: I7136b9502a7fa6f8ad9ad7236761a34c1a7fd4da Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Clean up QAccessibleTabBarFrederik Gladhorn2014-08-261-9/+24
| | | | | Change-Id: Ic0949e4d76a7332ef1a42c93a06a0e4515c1192d Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Remove QAccessibleToolButton::textFrederik Gladhorn2014-08-262-25/+0
| | | | | | | | | This function actually is worse than just calling QAccessibleButton::text which it already does. It would mess up the shortcut handling in addition to that. Change-Id: I56cb95a44624da4c5fccb43e6835f6012a083337 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Remove unused variableFrederik Gladhorn2014-08-261-1/+0
| | | | | Change-Id: I0414d7bab89371f330d5b0cfa88758e3f1668f32 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Accessibility: QSpinBox should not have any childrenFrederik Gladhorn2014-08-195-5/+160
| | | | | | | | | | On both iOS and Android it is very confusing to be able to move the focus to both, the line edit and the outer frame that is the spin box. For Linux this fixes an issue that orca would not read the value correctly after pressing the up/down buttons. Task-number: QTBUG-39861 Task-number: QTBUG-39442 Change-Id: I73c50c91e9021324c52d168d537afd0ea719a48f Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: Fix boundaries for text functions in QLineEditFrederik Gladhorn2014-08-131-0/+12
| | | | | | | | | | Make the functions work consistently. For example asking for the line at the cursor position when the cursor was at the end returned an empty line before. Task-number: QTBUG-38500 Change-Id: I60fc78c7be129a59c83efcfce6d8fdd16f2c3f65 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: Top level widgets should only be in the hierarchy onceFrederik Gladhorn2014-07-303-16/+12
| | | | | | | | | On Linux for example Orca gets confused when showing a dialog that is a child of another widget since it would show up twice in the hierarchy. Task-number: QTBUG-39444 Change-Id: I84773ecc3d6774a652dbeb29ad201779f5b3191c Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
* Accessibility: Improve handling current valueFrederik Gladhorn2014-07-071-9/+1
| | | | | | | | | Value interfaces on OS X and iOS can be strings, so can the value property of MSAA. Before we'd always only send doubles, instead change it to use strings as well. Change-Id: I1b4410c68238ba7a69a5507d87c251f2ac61c568 Reviewed-by: Caroline Chao <caroline.chao@digia.com>