summaryrefslogtreecommitdiffstats
path: root/src/widgets/accessible
Commit message (Collapse)AuthorAgeFilesLines
* QWidget/QLineEdit: deprecate get{Contents,Text}Margins()Marc Mutz2019-07-301-2/+1
| | | | | | | | | | | | | | | We have contentsMargins() and textMargins() methods since 4.6 which are much more efficient and easier to use. [ChangeLog][QtWidgets][QLineEdit] The getTextMargins() member function has been deprecated in favor of textMargins(). [ChangeLog][QtWidgets][QWidget] The getContentsMargins() member function has been deprecated in favor of contentsMargins(). Change-Id: Ifdb890af6198fc682b94701786c67a5b945a4b4c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QAccessibleWidget: fix UB (invalid cast)Marc Mutz2019-07-011-18/+2
| | | | | | | | | | Casting an object to a subclass that is not the dynamic type of the object constitutes undefined behavior. Fix by befriending QObject. Change-Id: Ib70dbef9095df31a6d89449d82a02cef9fccd348 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Add accessors for QWindow and QScreen to QWidgetPrivateFriedemann Kleint2019-06-181-9/+4
| | | | | | | | | | | | | | | | | Rewrite the existing accessor QWidgetPrivate::windowHandle() to accept a mode enumeration that has an "Any" convenience. Based on that, add QWidgetPrivate::associatedScreen(), which is seful in many places where scaling is performed. Prototypically simplify the code. Task-number: QTBUG-62094 Task-number: QTBUG-73231 Change-Id: I516288363d329bce9bc94e4951106f9357bc6cde Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QAccessibleWidgets: re-enable NRVO in childWidgets()Marc Mutz2019-05-291-2/+2
| | | | | | | | | | | | | ... for poor compilers such as GCC. Change-Id: Ifcf603657ff6242599972c21b135d7b6a0af4c35 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Make sure QAccessibleTableCell is valid before referenceFrederik Gladhorn2019-05-131-6/+19
| | | | | | | | | | There are some cases (model resets in weird positions) where we would crash due to accessing invalid model indices. Fixes: QTBUG-61416 Fixes: QTBUG-71608 Change-Id: Ibfedcbd921a3145f3e1596ac424a77f2319a5c46 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* Accessibility: Improve handling of read-only stateFrederik Gladhorn2019-05-072-2/+9
| | | | | | | | | | | We have been rather sloppy in how read-only versus editable is handled. According to the definition, editable signifies that in principle a widget allows the user to change its text. Read-only means that this ability is (currently) disabled. Task-number: QTBUG-75002 Change-Id: I5d71843abcdaac52f4a60a1abcac2604341f6c96 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* itemviews: Fix a condition typoIvan Komissarov2018-10-201-1/+1
| | | | | | | | | | | 'QAbstractItemView::NoSelection' named constant with the value of 0 was used in the bitwise operation Task-number: QTBUG-71156 Change-Id: I2d5099f9ed03cc42061508cc78282412a09825cb Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* QAccessibleTable(Header)Cell: fix isValid()Christian Ehrlicher2018-10-031-3/+5
| | | | | | | | | | | | QAccessibleTable(Header)Cell::isValid() did not check if the view is still valid as it is done in QAccessibleTable::isValid() which can lead to a crash during destruction when e.g. operator<<(QAccessibleInterface) is called. Change-Id: I930bf4c22aa0aa6868f58a8e5d0dd1557f6b17af Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Remove left-over commentFrederik Gladhorn2018-07-161-2/+0
| | | | | | | This is private API and the protected does hardly matter. Change-Id: I8e5c99db16d521d47eb9a5fb57a6519301d63a9b Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QAccessibleTabButton: fix isValidFrederik Gladhorn2018-07-081-1/+8
| | | | | | | | | | | The button interface is faking everything to represent the buttons when it comes to accessibility, since they are not represented by a QWidget. When the parent TabBar is in its destructor, isValid should return false to prevent accessing it. Task-number: QTBUG-69283 Change-Id: Ifedf3fa45f9106723afb0b04922b071a3c5467c3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Accessible: use range-based for instead of foreachAnton Kudryavtsev2018-04-184-12/+11
| | | | | | Change-Id: Idb745f6a59d102f2f89b2cfa5177ec874d7599a8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Use placeholder text for accessible description of QLineEditJosé Millán Soto2018-02-051-0/+2
| | | | | | | | | If the accessible description of a QLineEdit is requested and none has been set, the placeholder text will be provided if one is available. Change-Id: I4c0dad1d06fd3d8a6e00c963402d380c59bd7f05 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Update usage of QFontMetrics::width() to new APIEskil Abrahamsen Blomfeldt2017-12-082-2/+2
| | | | | | | | | | | | | | QFontMetrics(F)::width() has been deprecated and is replaced by horizontalAdvance(). This updates all usage of it in tests and documentation. It is worth noting that many or most of the usages of QFontMetrics::width() probably intended to use boundingRect().width(), but since it currently works, I have not looked into that, just replaced the function name mechanically. Change-Id: Iec382e5bad0b50f37a6cfff841bfb46ed4d4555f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-231-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/access/qhttp2protocolhandler_p.h src/network/kernel/kernel.pri src/network/ssl/qsslkey_qt.cpp src/plugins/platforms/cocoa/qcocoascreen.mm src/plugins/platforms/windows/accessible/iaccessible2.cpp src/plugins/platforms/windows/accessible/iaccessible2.h src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h src/widgets/widgets/qmenu_p.h tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml Done-with: Edward Welbourne <edward.welbourne@qt.io> Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
| * Make sure that QAccessibleWindowContainer::childCount is validFrederik Gladhorn2017-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | When embedding foreign windows, we won't be able to return a valid child accessible interface, so do not report it at all. Supporting foreign windows properly is platform specific and something to consider, but at least we shouldn't crash. Task-number: QTBUG-63451 Change-Id: I19350cf97dc8d0c3f3052411eba0eee5f750dbab Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Fix accessibility info for tri-state checkboxesAndre de la Rocha2017-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | The state information provided by QAccessibleInterface::state() was not correctly reflecting the state of tri-state checkboxes: checkStateMixed was never set. This change fixes this issue and also adds accessibility update notifications for changes in checkStateMixed, which were missing. Change-Id: Ia4a114559d5a957ca85bf2f169a6cece2c98d077 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-09-2612-62/+93
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/kernel/qguiapplication.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforminputcontexts/ibus/qibusplatforminputcontext.h src/plugins/platforms/cocoa/qcocoawindow.h src/testlib/qtestsystem.h Change-Id: I5975ffb3261c2dd82fe02ec4e57df7c0950226c5
| * Convert features.menu to QT_[REQUIRE_]CONFIGStephan Binner2017-09-196-13/+21
| | | | | | | | | | Change-Id: I031356411294b259ebd2b22c53159c93fd92af6e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.textedit to QT_[REQUIRE_]CONFIGStephan Binner2017-09-193-7/+10
| | | | | | | | | | Change-Id: I0fb0e658796484f374586d8d1f0f1b9167ab30d2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.slider to QT_[REQUIRE_]CONFIGStephan Binner2017-09-123-5/+7
| | | | | | | | | | Change-Id: I03adb5e34071aa106bbfe7caa2d41a93e8d1e263 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.lineedit to QT_[REQUIRE_]CONFIGStephan Binner2017-09-125-5/+11
| | | | | | | | | | Change-Id: I509977994b11a7fc0c109bfcc83aadeee6c9b0b8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.spinbox to QT_[REQUIRE_]CONFIGStephan Binner2017-09-124-6/+8
| | | | | | | | | | Change-Id: Idecb6927c20ff009795b0ad94bbb7199df98a8f8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.mdiarea to QT_[REQUIRE_]CONFIGStephan Binner2017-09-113-5/+7
| | | | | | | | | | Change-Id: I6d2ec035a218869aa6595f5848de94ce491d3124 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.mainwindow to QT_[REQUIRE_]CONFIGStephan Binner2017-09-113-5/+7
| | | | | | | | | | Change-Id: If7efc8c15d8876f5bc5575d48686894ea71bbe62 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.scrollarea to QT_[REQUIRE_]CONFIGStephan Binner2017-09-043-5/+7
| | | | | | | | | | Change-Id: Ifc7b0a6b025c282234b4aeaf23daecff8a558236 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.menubar to QT_[REQUIRE_]CONFIGStephan Binner2017-09-043-8/+10
| | | | | | | | | | Change-Id: Idbd4978852fa280dd18a5684469d499da3892126 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * Convert features.stackedwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-09-042-3/+5
| | | | | | | | | | Change-Id: I06b7fb9736620dcdfda21fc0a06e13cb02f9a1e7 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-193-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Replace Q_DECL_OVERRIDE with override where possibleKevin Funk2017-09-198-328/+328
|/ | | | | | | | | | | | | | | | Remaining uses of Q_DECL_OVERRIDE are in: src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.cpp doc/global/qt-cpp-defines.qdocconf (definition and documentation of Q_DECL_OVERRIDE) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Convert features.toolbutton to QT_[REQUIRE_]CONFIGStephan Binner2017-08-103-6/+10
| | | | | Change-Id: I4227e1868da21bded76a8ec55996c436c8a8d763 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.splitter to QT_[REQUIRE_]CONFIGStephan Binner2017-08-101-1/+1
| | | | | Change-Id: I2eea5004938c581beb5a7c0c01409c576c5e5b39 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.groupbox to QT_[REQUIRE_]CONFIGStephan Binner2017-08-104-5/+9
| | | | | Change-Id: I034286043a880ab777ec3f2311572bdc38e7fafc Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.scrollbar to QT_[REQUIRE_]CONFIGStephan Binner2017-08-105-5/+11
| | | | | Change-Id: Id6ea899c0fddf0de636701cfdc5f01ba20024976 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.toolbox to QT_[REQUIRE_]CONFIGStephan Binner2017-08-102-3/+5
| | | | | Change-Id: I7abfe0166a021c439f6ed4465631ba62660ef001 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.progressbar to QT_[REQUIRE_]CONFIGStephan Binner2017-08-103-5/+7
| | | | | Change-Id: I66d00d5bac98ff337ba5877e5f23be5e14a97551 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.textbrowser to QT_[REQUIRE_]CONFIGStephan Binner2017-08-103-5/+7
| | | | | Change-Id: I02a0c39c308204f7c67674928973275fa1247d38 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.statusbar to QT_[REQUIRE_]CONFIGStephan Binner2017-08-081-2/+4
| | | | | Change-Id: Ifc1881388e559d3235df0202ac6d26f78ba2c691 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.dial to QT_[REQUIRE_]CONFIGStephan Binner2017-08-083-6/+7
| | | | | Change-Id: I9fea2451fe3567fdd1af1540e9a55f218f54b569 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.tabbar to QT_[REQUIRE_]CONFIGStephan Binner2017-07-253-6/+8
| | | | | Change-Id: Id21a95cbc61b2559a8f517ee60548b61536e3cc4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.dockwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-07-253-6/+8
| | | | | Change-Id: I1d4b0268df01f8bc0aec28af52cc4b639a376863 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.itemviews to QT_[REQUIRE_]CONFIGStephan Binner2017-07-257-11/+16
| | | | | | | The QT_NO_ITEMVIEWS queries in corelib/ seem to had no effect at all. Change-Id: I494ee2309a96b0cf25de18781fc9a675878a2ee9 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.combobox to QT_[REQUIRE_]CONFIGStephan Binner2017-07-253-5/+7
| | | | | Change-Id: I2f415de8556289a6461a645d559be17089c43c99 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.calendarwidget to QT_[REQUIRE_]CONFIGStephan Binner2017-07-253-5/+7
| | | | | Change-Id: I93c2e00828a233f004c599bd0702d0a470ae29ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.listview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-212-2/+3
| | | | | Change-Id: I707a839bcfc7ad481342d1adb98c9b593f5ca6e2 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.treeview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-154-15/+19
| | | | | Change-Id: I4a036a0410615ac563b17f7715c47acccb8abfca Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.tableview to QT_[REQUIRE_]CONFIGStephan Binner2017-07-112-8/+9
| | | | | Change-Id: I7ab479deff7bbf3083d1efa196e0480b181548c5 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.rubberband to QT_[REQUIRE_]CONFIGStephan Binner2017-07-113-1/+5
| | | | | Change-Id: I6d634bafa6d26c1e78069fddd412e6de24f5775c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.whatsthis to QT_[REQUIRE_]CONFIGStephan Binner2017-06-292-1/+5
| | | | | | | Move feature definition to gui/configure.json Change-Id: I00b35c0e259d0a695d84a9bf6803eba74d41465a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.treewidget to QT_[REQUIRE_]CONFIGStephan Binner2017-06-281-1/+1
| | | | | | | Also fix too specific #include on the way Change-Id: Ieff5f40584ecc5f680f09a8a4b95d5604ff1e940 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Convert features.lcdnumber to QT_[REQUIRE_]CONFIGStephan Binner2017-05-291-1/+3
| | | | | Change-Id: Ie99d2ce0a836c27fb882c04ff465e6cdd483d360 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>