diff options
Diffstat (limited to 'src/events.hpp')
| -rw-r--r-- | src/events.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/events.hpp b/src/events.hpp index 6d10fc7..96b9008 100644 --- a/src/events.hpp +++ b/src/events.hpp @@ -14,10 +14,10 @@ class BrowserEvent { public: - std::string kind = "-"; + QString kind = "-"; virtual ~BrowserEvent() = default; - virtual void lua_push(lua_State *state) { lua_newtable(state); }; + virtual void lua_push(lua_State *state) const { lua_newtable(state); }; }; class UrlChangedEvent : public BrowserEvent { @@ -31,7 +31,7 @@ public: kind = "UrlChanged"; } - void lua_push(lua_State *state) override { + void lua_push(lua_State *state) const override { lua_newtable(state); SET_FIELD("tab", integer, webview_id) SET_FIELD("win", integer, win_id) @@ -40,8 +40,8 @@ public: }; struct EventHandlerRequest { - std::vector<std::string> event_names; - std::vector<std::string> patterns; - std::function<void(BrowserEvent &)> handler; + std::vector<QString> event_names; + std::vector<QString> patterns; + std::function<void(BrowserEvent *)> handler; int function_ref; }; |
