summaryrefslogtreecommitdiff
path: root/src/commandhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-22 12:34:24 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-22 12:34:24 +0300
commit3472c0b5ef25dd9c9547a05a517366e46e6d9f78 (patch)
treee0abd956cafabf118a88b2bf06831dd3b64dbc1e /src/commandhandler.cpp
parentaa85f15df21e65b42c62bcad25a331b944bf270f (diff)
downloadplus-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.tar.gz
plus-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.tar.bz2
plus-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.tar.xz
plus-3472c0b5ef25dd9c9547a05a517366e46e6d9f78.zip
Use same function prototypes for action and command handlers.
Diffstat (limited to 'src/commandhandler.cpp')
-rw-r--r--src/commandhandler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp
index b594d8bda..0cf4f803c 100644
--- a/src/commandhandler.cpp
+++ b/src/commandhandler.cpp
@@ -107,11 +107,16 @@ void CommandHandler::callFunc(const CommandInfo &info,
const std::string &args,
ChatTab *const tab)
{
- const CommandFuncPtr func = info.func;
+ const ActionFuncPtr func = info.func;
if (func)
- func(args, tab);
+ {
+ InputEvent evt(args, tab);
+ func(evt);
+ }
else
+ {
inputManager.executeAction(info.actionId);
+ }
}
void CommandHandler::invokeCommand(const int type)