diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-02-07 22:54:20 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-02-07 22:55:11 +0100 |
commit | 75c610d1f65d741bbeba9f1ddeef60a6e9315427 (patch) | |
tree | 0dd79a5a7f35c89b9672d55fbf24cb1f6de13aa9 /plugins/HotExamples.hpp | |
parent | 9539a71dbeafdc4107d3b92eefada332ee45579a (diff) |
Use one struct for all args in Page::submit instead of multiple args (easier to add new fields without changing code)
Also remove submit_body_item from page.
Diffstat (limited to 'plugins/HotExamples.hpp')
-rw-r--r-- | plugins/HotExamples.hpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/HotExamples.hpp b/plugins/HotExamples.hpp index 73bc150..9bca74a 100644 --- a/plugins/HotExamples.hpp +++ b/plugins/HotExamples.hpp @@ -9,7 +9,7 @@ namespace QuickMedia { public: HotExamplesLanguageSelectPage(Program *program) : Page(program) {} const char* get_title() const override { return "Select language"; } - PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override; + PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override; bool submit_is_async() const override { return false; } }; @@ -19,7 +19,7 @@ namespace QuickMedia { const char* get_title() const override { return "Select result"; } bool search_is_filter() override { return false; } SearchResult search(const std::string &str, BodyItems &result_items) override; - PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override; + PluginResult submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) override; private: std::string language; }; @@ -28,7 +28,7 @@ namespace QuickMedia { public: HotExamplesCodeExamplesPage(Program *program, std::string title) : Page(program), title(std::move(title)) {} const char* get_title() const override { return title.c_str(); } - PluginResult submit(const std::string&, const std::string&, std::vector<Tab>&) override { return PluginResult::OK; } + PluginResult submit(const SubmitArgs &args, std::vector<Tab>&) override { (void)args; return PluginResult::OK; } bool submit_is_async() const override { return false; } private: std::string title; |