summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatforminputcontext.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Automatically reflect new input context input direction when locale changesTor Arne Vestbø2023-10-061-0/+12
| | | | | | | | | | | | All platforms except Wayland fail to check for input direction change when the locale changes, and only emitLocaleChanged. We can simplify this for the platforms by checking if the new locale caused a change in input direction, and if so emit inputDirectionChanged on their behalf. Change-Id: I84d8df9392db5e716f5c277d0cc9e17e5a21783f Reviewed-by: Liang Qi <liang.qi@qt.io>
* Remove QKeyMapperPrivateTor Arne Vestbø2023-09-301-2/+2
| | | | | | | | | | | | | | | | | | | There is no point in maintaining the keyboardInputLocale and keyboardInputDirection in the QKeyMapperPrivate, as these things are handled by QInputContext nowadays. The values were never updated either, so the base class implementation of QPlatformInputContext referring to them was confusing. With those gone, we can remove the entire class. Subclasses of QPlatformInputContext typically only override locale(), so we now base the input language direction on the current locale(), giving dynamic updates of the direction as well (without the signal, but this will be fixed in a follow up patch). Change-Id: I16ae4097eadadd278e60edea3c1101ab90ed7444 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Doc: Remove duplicate wordsAndreas Eliasson2023-02-281-1/+1
| | | | | | Change-Id: Ia7a38a1035bd34d00f20351a0adc3927e473b2e7 Pick-to: 6.5 6.4 6.2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* QtGui: includemocsMarc Mutz2022-04-291-0/+2
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: I1945741794c25679a9d94c0d68c8642e2c823502 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Make setSelectionOnFocusObject() take native pixelsMorten Sørvig2021-02-021-5/+9
| | | | | | | | | | | | Change the setSelectionOnFocusObject() to take geometry arguments in native pixels, in order to be consistent with other QPlatformInputContext API. Calling code which pass non-native geometry must be updated (in practice only the Android platform plugin). Change-Id: I1c61b8cf583afe607567d6056ca7ff23cc3de3f3 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add geometry accessors to QPlatformInputContextMorten Johan Sørvig2021-02-011-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | Currently the platform plugins use the public QInputMethod API when querying geometry. However, QInputMethod returns geometry in device independent pixels, while the platform plugins require geometry in native pixels. Add new API to QPlatformInputContext which returns input geometry in the native window coordinate system: QRectF inputItemRectangle() QRectF inputItemClipRectangle() QRectF cursorRectangle() QRectF anchorRectangle() QRectF keyboardRectangle() These make the relevant QHighDpi calls internally, and such calls can then be moved out of the platform plugins. Disambiguate inputItemRectangle() in qandroidinputcontext.cpp by renaming it to screenInputItemRectangle(). Change-Id: I561745b64fb197d64e3dfddcf0751528bb8d0605 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-4/+4
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Do not allow empty selectionsBogDan Vatra2018-01-271-0/+2
| | | | | | | | Allowing empty selections leads to strange behavior, it switches from selection handles to cursor handle. Change-Id: Ida69346e2a47b13c92cfd68a555d6b94422bb580 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Add support for ImhAnchorRectangleJan Arve Sæther2016-04-061-0/+27
| | | | | | | | | | | | Adds the following API: * QInputMethod::anchorRectangle() * QPlatformInputContext::setSelectionOnFocusObject() This will be used for determining how to display selection handles. Change-Id: If57e3fd58ff0f1ba7899f7dd62bfa9c006028667 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | 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>
* Fix invocations of static methods of QGuiApplication/QApplication.Friedemann Kleint2015-02-251-5/+5
| | | | | | Change-Id: I99ba58763f6063fa2a6f511adbea0163cce7ea32 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | 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 capabilities to QPlatformInputContext.Friedemann Kleint2014-11-261-0/+11
| | | | | | | | | | | | Add a capability enumeration to QPlatformInputContext and use that to turn off input methods for hidden text depending on platform support. Disable on Windows. Task-number: QTBUG-40691 Change-Id: I9909005de1f21316ec8f64e2729f1fffcd37c7c3 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Doc: Adding mark-up to boolean default values.Jerome Pasion2013-10-081-3/+3
| | | | | | | | | | | | | | | | | Default values should have mark-up to denote that they are code. This commit changes: -"property is true" to "property is \c true". -"Returns true" to "Returns \c true". -"property is false" to "property is \c false". -"returns true" to "returns \c true". -"returns false" to "returns \c false". src/3rdparty and non-documentation instances were ignored. Task-number: QTBUG-33360 Change-Id: Ie87eaa57af947caa1230602b61c5c46292a4cf4e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | 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>
* Remove _qpa from cpp filenamesGirish Ramakrishnan2012-07-031-0/+262
36547f4eff44361f7a6acd0cff107c0e47561f93 removed the _qpa from .h files and promised to remove it from .cpp files at a later date. Change-Id: I24a5c3796f6b07dd9a1931b699f3212d315edb12 Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>