summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@qt.io>2018-01-31 11:33:43 +0100
committerGatis Paeglis <gatis.paeglis@qt.io>2018-02-22 21:38:07 +0000
commitd98f17d4348ebf52bef7a02c3134d67bbee0a55d (patch)
tree447d130a52a0212060bda0b4fa6cb6792d02976c
parent5d3f540fc6bea4d6a4dfb94ebecc98a59035d8d2 (diff)
doc: improve QPlatformIntegration::possibleKeys() documentation
- There is no need to mention qkeymapper, which is an internal implementation detail. - Describe the encoding of int. - Add a note that calling possibleKeys() outside key event handler context is not valid. Change-Id: Ife9b7d1496f04b5a433ed2d56f29c4f01f174441 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r--src/gui/kernel/qplatformintegration.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp
index 448d670209..866ce08a28 100644
--- a/src/gui/kernel/qplatformintegration.cpp
+++ b/src/gui/kernel/qplatformintegration.cpp
@@ -446,12 +446,13 @@ Qt::KeyboardModifiers QPlatformIntegration::queryKeyboardModifiers() const
/*!
Should be used to obtain a list of possible shortcuts for the given key
- event. As that needs system functionality it cannot be done in qkeymapper.
+ event. Shortcuts should be encoded as int(Qt::Key + Qt::KeyboardModifiers).
- One example for more than 1 possibility is the key combination of Shift+5.
+ One example for more than one possibility is the key combination of Shift+5.
That one might trigger a shortcut which is set as "Shift+5" as well as one
- using %. These combinations depend on the currently set keyboard layout
- which cannot be obtained by Qt functionality.
+ using %. These combinations depend on the currently set keyboard layout.
+
+ \note This function should be called only from key event handlers.
*/
QList<int> QPlatformIntegration::possibleKeys(const QKeyEvent *) const
{