summaryrefslogtreecommitdiff
path: root/qutebrowser/keyinput
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-11-03 19:49:31 +0100
committerFlorian Bruhin <me@the-compiler.org>2020-11-04 18:30:04 +0100
commit923c248e1296d12072d03500276587999fd610d0 (patch)
tree61a12b7f88dd569fd5a82e2f5058a1f1f98cc5a3 /qutebrowser/keyinput
parentbcb8b5dd7097c51e8b4067ab55eed21d62eabcce (diff)
downloadqutebrowser-923c248e1296d12072d03500276587999fd610d0.tar.gz
qutebrowser-923c248e1296d12072d03500276587999fd610d0.zip
old qt: Remove KeyInfo.__hash__
Diffstat (limited to 'qutebrowser/keyinput')
-rw-r--r--qutebrowser/keyinput/keyutils.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/qutebrowser/keyinput/keyutils.py b/qutebrowser/keyinput/keyutils.py
index aa5457c6d..7b3f280e0 100644
--- a/qutebrowser/keyinput/keyutils.py
+++ b/qutebrowser/keyinput/keyutils.py
@@ -352,7 +352,7 @@ def _parse_single_key(keystr: str) -> str:
return 'Shift+' + keystr if keystr.isupper() else keystr
-@attr.s(frozen=True, hash=False)
+@attr.s(frozen=True)
class KeyInfo:
"""A key with optional modifiers.
@@ -378,14 +378,6 @@ class KeyInfo:
_assert_plain_modifier(modifiers)
return cls(key, cast(Qt.KeyboardModifier, modifiers))
- def __hash__(self) -> int:
- """Convert KeyInfo to int before hashing.
-
- This is needed as a WORKAROUND because enum members aren't hashable
- with PyQt 5.7.
- """
- return hash(self.to_int())
-
def __str__(self) -> str:
"""Convert this KeyInfo to a meaningful name.