diff --git a/src/ui/form/tray/trayicon.cpp b/src/ui/form/tray/trayicon.cpp index 322a760b..0208bf73 100644 --- a/src/ui/form/tray/trayicon.cpp +++ b/src/ui/form/tray/trayicon.cpp @@ -711,8 +711,7 @@ void TrayIcon::updateActionHotKeys() if (!shortcut.isEmpty() && iniKey == HotKey::appGroupModifier) { const QKeyCombination key = shortcut[0]; - shortcut = Qt::KeyboardModifiers(key & Qt::KeyboardModifierMask) - | (Qt::Key_F1 + groupIndex); + shortcut = key.keyboardModifiers() | (Qt::Key_F1 + groupIndex); ++groupIndex; } diff --git a/src/ui/manager/nativeeventfilter.cpp b/src/ui/manager/nativeeventfilter.cpp index 93500533..49d2b22c 100644 --- a/src/ui/manager/nativeeventfilter.cpp +++ b/src/ui/manager/nativeeventfilter.cpp @@ -128,8 +128,7 @@ bool NativeEventFilter::registerHotKey( bool NativeEventFilter::registerHotKey(int hotKeyId, QKeyCombination key) { - return registerHotKey(hotKeyId, Qt::Key(key & ~Qt::KeyboardModifierMask), - Qt::KeyboardModifiers(key & Qt::KeyboardModifierMask)); + return registerHotKey(hotKeyId, key.key(), key.keyboardModifiers()); } void NativeEventFilter::unregisterHotKeys()