diff options
| author | Michał Łoś <michal.los@siili.com> | 2024-10-03 10:40:27 +0200 |
|---|---|---|
| committer | Michał Łoś <michal.los@siili.com> | 2024-10-16 14:30:20 +0200 |
| commit | 1d0ec32f71e24760780d826fd4560bac7d2348d5 (patch) | |
| tree | 115dd196c3c9dffa087d43302782188723c4f18d /src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp | |
| parent | bd475ddf47e33535c2b79367c8850cd611089e3c (diff) | |
Extract toQtModifiers to place where it belongs
`QEvdevKeyboardHandler` contains static method `toQtModifiers` which is
not operating on any of its internal fields or types. This indicates
that this method doesn't belong to this class, and in fact it should be
moved to `QEvdevKeyboardMap` where types used in it are declared.
Move this static method to `QEvdevKeyboardMap` namespace. This is a
preparatory change to extract `QEvdevKeyboardMap` to separate header.
Task-number: QTBUG-115777
Change-Id: Ibe88b40a56fb96772d903498611777b3ec19dded
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp')
| -rw-r--r-- | src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp index f54ca6a77d4..2b06e985a7b 100644 --- a/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp +++ b/src/platformsupport/input/evdevkeyboard/qevdevkeyboardhandler.cpp @@ -202,7 +202,7 @@ void QEvdevKeyboardHandler::processKeyEvent(int nativecode, int unicode, int qtc Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat) { if (!autoRepeat) - QGuiApplicationPrivate::inputDeviceManager()->setKeyboardModifiers(QEvdevKeyboardHandler::toQtModifiers(m_modifiers)); + QGuiApplicationPrivate::inputDeviceManager()->setKeyboardModifiers(QEvdevKeyboardMap::toQtModifiers(m_modifiers)); QWindow *window = nullptr; #ifdef Q_OS_WEBOS @@ -336,7 +336,7 @@ QEvdevKeyboardHandler::KeycodeAction QEvdevKeyboardHandler::processKeycode(quint // so just report the plain mapping with additional modifiers. if ((it == map_plain && it != map_withmod) || (map_withmod && !(map_withmod->qtcode & modmask))) { - qtcode |= QEvdevKeyboardHandler::toQtModifiers(modifiers); + qtcode |= QEvdevKeyboardMap::toQtModifiers(modifiers); } if (m_composing == 2 && first_press && !(it->flags & QEvdevKeyboardMap::IsModifier)) { |
