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>
bb10
Gatis Paeglis 2018-01-31 11:33:43 +01:00
parent 5d3f540fc6
commit d98f17d434
1 changed files with 5 additions and 4 deletions

View File

@ -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
{