diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-04-05 16:36:18 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-04-05 16:36:18 +0530 |
| commit | b6526785478ea8ba70ddd119f1e3e53a892d4a22 (patch) | |
| tree | ab8d25169ead042255c5057f0969e775c61ab8dc /src/keymap/KeySeqParser.hpp | |
| parent | 09cdcd15b31469c839831cad534fec9896999b60 (diff) | |
| download | null-browser-b6526785478ea8ba70ddd119f1e3e53a892d4a22.tar.gz null-browser-b6526785478ea8ba70ddd119f1e3e53a892d4a22.zip | |
Update clang formatting
Diffstat (limited to '')
| -rw-r--r-- | src/keymap/KeySeqParser.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/keymap/KeySeqParser.hpp b/src/keymap/KeySeqParser.hpp index eb878ab..31680a9 100644 --- a/src/keymap/KeySeqParser.hpp +++ b/src/keymap/KeySeqParser.hpp @@ -6,8 +6,9 @@ struct KeyChord { Qt::KeyboardModifiers mod; Qt::Key key; + + bool operator==(const KeyChord &chord2) const; }; -bool operator==(KeyChord chord1, KeyChord chord2); using KeySequence = QList<KeyChord>; @@ -19,14 +20,12 @@ enum KeyMatchType : uint8_t { class KeySeqParser { public: - static KeyMatchType key_sequence_match(const KeySequence &target, - const KeySequence ¤t) { + static KeyMatchType key_sequence_match(const KeySequence &target, const KeySequence ¤t) { for (int i = 0; i < target.length(); i++) { if (current.length() <= i) return KeyMatchType::Pending; - if (target[i].key != current[i].key || - !target[i].mod.testFlags(current[i].mod)) + if (target[i].key != current[i].key || !target[i].mod.testFlags(current[i].mod)) return KeyMatchType::NoMatch; } |
