mirror of
https://github.com/tnodir/fort
synced 2024-11-15 03:56:18 +00:00
UI: Use QKeyCombination's methods
This commit is contained in:
parent
1b0ed39a08
commit
71c2ad9094
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user