aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/util/qquickshortcut.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-191-1/+1
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* Check the context matcher for isDestroyed() before assigning itUlf Hermann2017-12-201-1/+2
| | | | | | | | | | Some code "resets" a custom context matcher on destruction. As destruction order of global objects is not defined, that may be after the context matcher has already been destroyed. Change-Id: I1d3869cb393c490ddb70b71a2d93578a03e2af79 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* watch for the actual render window if there is a QQuickRenderControlMarco Martin2017-11-221-0/+3
| | | | | | | | | | | if the scene is rendered by a QQuickRenderControl and we have a different target window (for instance QQuickWidget) we check the target window of the render control instead of the own window, this fixes window keyboard shortcuts for QQuickWidget Task-number: QTBUG-64548 Change-Id: I7614be580f2a707c752189e4c9b53a5d5f0159d7 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Keys: add shortcutOverride signalMitch Curtis2016-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | This allows an item to accept the shortcutOverride event, preventing e.g. Shortcut from stealing key events. The original use case that prompted the creation of this patch was using a Popup from Controls 2 to create a keyboard shortcut editor. When the user wanted to cancel the shortcut that they were editing, they could press escape, but Popup would grab the shortcut and close itself. As the test case demonstrates, the same problem occurs with the Shortcut type in Qt Quick. [ChangeLog][QtQuick][Keys] Added shortcutOverride signal to Keys attached object to allow prevention of e.g. Shortcut from stealing key events. Task-number: QTBUG-57098 Change-Id: I594e4ea17ec417d8c7d93c6cf347c1a1a2e62b93 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Shortcut: add support for multiple key sequencesJ-P Nurmi2016-11-161-33/+116
| | | | | | | | | | | | [ChangeLog][QtQuick][Shortcut] Added support for multiple shortcut sequences. Previously it was possible to specify a single sequence that could consist of up to four key presses. Now it is possible to specify multiple sequences that can each consist of multiple key presses. Change-Id: Id12f25da2f352cc542ec776049d8e81593951d41 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickShortcut: allow setting a custom context matcherJ-P Nurmi2016-10-261-20/+35
| | | | | | | | | | | This allows Qt Quick Controls 2 to register a shortcut context matcher that makes shortcuts behave well with QQC2's item-based popups, which QQuickShortcut is not aware of. Task-number: QTBUG-56562 Change-Id: Ia2518fd6ac7140f60aa38c7d9af557007e9db23b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-181-1/+1
|\ | | | | | | Change-Id: I20c622263f40c322954328e4d10a8071db3ca6d1
| * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the Mac platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: Iea114ac73c01d74401bcd77373b41a825d2636c9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* | Updated license headersJani Heikkinen2016-01-191-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: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Shortcut: make both nativeText and portableText availableJ-P Nurmi2015-11-051-5/+22
| | | | | | | | | | | | They have different use cases. One is for display purposes, whereas the other is suitable for storing to settings etc. [ChangeLog][QtQuick] Added Shortcut.nativeText and portableText properties to read back the key sequence as a string Change-Id: I5575925ae08ccc9fa8933afc053651b0f3813181 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Shortcut: add sequenceString propertyShawn Rutledge2015-09-031-0/+14
| | | | | | | | | | | | | If you set sequence to a StandardKey, then read back the property, you will get an int, which is not suitable for display. Now you can use sequenceString for tooltips, preference dialogs for setting shortcuts, and such. [ChangeLog][QtQuick] Added Shortcut.sequenceString property to read back the key sequence as a displayable string Change-Id: I63ee46f8a2c2da1b1c803282baa894fb1667fe67 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Introduce ShortcutJ-P Nurmi2015-01-231-0/+283
[ChangeLog][QtQuick] Added a Shortcut utility type for catching keyboard shortcuts Change-Id: I4af631bfa7987f0d809b1f5af499f1d9688a1e04 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>