| 106 | } |
| 107 | |
| 108 | void HotkeyWidget::keyPressEvent(QKeyEvent *event) |
| 109 | { |
| 110 | if (mKeyboardFocus) { |
| 111 | return; |
| 112 | } |
| 113 | |
| 114 | if (isModifier(event->key())) { |
| 115 | return; |
| 116 | } |
| 117 | |
| 118 | if (!isValid(event->key())) { |
| 119 | setText(tr("Invalid hotkey")); |
| 120 | parentWidget()->setFocus(); |
| 121 | return; |
| 122 | } |
| 123 | |
| 124 | mHotkey = QKeySequence(event->key() + (event->modifiers() & ~Qt::KeypadModifier)); |
| 125 | |
| 126 | setHotkeyText(); |
| 127 | } |
| 128 | |
| 129 | void HotkeyWidget::hideError() |
| 130 | { |
nothing calls this directly
no outgoing calls
no test coverage detected