KeySequence: Make sure we got valid key codes
This commit is contained in:
parent
3649a36869
commit
68db8d04ad
@ -356,6 +356,7 @@ class KeySequence:
|
|||||||
|
|
||||||
def _validate(self, keystr=None):
|
def _validate(self, keystr=None):
|
||||||
for info in self:
|
for info in self:
|
||||||
|
assert Qt.Key_Space <= info.key <= Qt.Key_unknown, info.key
|
||||||
if info.key == Qt.Key_unknown:
|
if info.key == Qt.Key_unknown:
|
||||||
raise KeyParseError(keystr, "Got unknown key!")
|
raise KeyParseError(keystr, "Got unknown key!")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user