aboutsummaryrefslogtreecommitdiff
path: root/src/keymap/KeySeqParser.hpp
diff options
context:
space:
mode:
authorAkshay Nair <phenax5@gmail.com>2025-04-05 16:36:18 +0530
committerAkshay Nair <phenax5@gmail.com>2025-04-05 16:36:18 +0530
commitb6526785478ea8ba70ddd119f1e3e53a892d4a22 (patch)
treeab8d25169ead042255c5057f0969e775c61ab8dc /src/keymap/KeySeqParser.hpp
parent09cdcd15b31469c839831cad534fec9896999b60 (diff)
downloadnull-browser-b6526785478ea8ba70ddd119f1e3e53a892d4a22.tar.gz
null-browser-b6526785478ea8ba70ddd119f1e3e53a892d4a22.zip
Update clang formatting
Diffstat (limited to 'src/keymap/KeySeqParser.hpp')
-rw-r--r--src/keymap/KeySeqParser.hpp9
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 &current) {
+ static KeyMatchType key_sequence_match(const KeySequence &target, const KeySequence &current) {
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;
}