Add abstract execute() to KeyParser
This commit is contained in:
parent
e06583ade2
commit
5aaf3b3430
@ -322,6 +322,15 @@ class KeyParser(QObject):
|
|||||||
"Ignoring keychain \"{}\" in section \"{}\" because "
|
"Ignoring keychain \"{}\" in section \"{}\" because "
|
||||||
"keychains are not supported there.".format(key, sectname))
|
"keychains are not supported there.".format(key, sectname))
|
||||||
|
|
||||||
|
def execute(self, cmdstr, count=None):
|
||||||
|
"""Handle a completed keychain.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
cmdstr: The command to execute as a string.
|
||||||
|
count: The count if given.
|
||||||
|
"""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
@pyqtSlot(str, str)
|
@pyqtSlot(str, str)
|
||||||
def on_config_changed(self, section, _option):
|
def on_config_changed(self, section, _option):
|
||||||
"""Re-read the config if a keybinding was changed."""
|
"""Re-read the config if a keybinding was changed."""
|
||||||
@ -363,5 +372,4 @@ class CommandKeyParser(KeyParser):
|
|||||||
message.set_cmd_text(':{} '.format(cmdstr))
|
message.set_cmd_text(':{} '.format(cmdstr))
|
||||||
|
|
||||||
def execute(self, cmdstr, count=None):
|
def execute(self, cmdstr, count=None):
|
||||||
"""Handle a completed keychain."""
|
|
||||||
self._run_or_fill(cmdstr, count, ignore_exc=False)
|
self._run_or_fill(cmdstr, count, ignore_exc=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user