mirror of
https://github.com/lubosz/overte.git
synced 2025-04-12 18:12:37 +02:00
input-plugins/KeyboardMouseDevice: Cast Qt::Key to uint16_t for bitwise operation.
Fixes warning: bitwise operation between different enumeration types ‘Qt::Key’ and ‘KeyboardMouseDevice::KeyboardChannel’ is deprecated.
This commit is contained in:
parent
4ce72674e9
commit
d69f90635f
1 changed files with 1 additions and 1 deletions
|
@ -279,7 +279,7 @@ void KeyboardMouseDevice::touchUpdateEvent(const QTouchEvent* event) {
|
|||
}
|
||||
|
||||
controller::Input KeyboardMouseDevice::InputDevice::makeInput(Qt::Key code) const {
|
||||
auto shortCode = (uint16_t)(code & KEYBOARD_MASK);
|
||||
uint16_t shortCode = static_cast<uint16_t>(code) & KEYBOARD_MASK;
|
||||
if (shortCode != code) {
|
||||
shortCode |= 0x0800; // add this bit instead of the way Qt::Key add a bit on the 3rd byte for some keys
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue