diff options
Diffstat (limited to 'src/plugins/HotExamples.cpp')
-rw-r--r-- | src/plugins/HotExamples.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/HotExamples.cpp b/src/plugins/HotExamples.cpp index 043ddfd..fbefad5 100644 --- a/src/plugins/HotExamples.cpp +++ b/src/plugins/HotExamples.cpp @@ -21,8 +21,8 @@ namespace QuickMedia { body_items.push_back(create_body_item_with_url("TypeScript", "typescript")); } - PluginResult HotExamplesLanguageSelectPage::submit(const std::string&, const std::string &url, std::vector<Tab> &result_tabs) { - result_tabs.push_back({ create_body(), std::make_unique<HotExamplesSearchPage>(program, url), create_search_bar("Search...", 500) }); + PluginResult HotExamplesLanguageSelectPage::submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) { + result_tabs.push_back({ create_body(), std::make_unique<HotExamplesSearchPage>(program, args.url), create_search_bar("Search...", 500) }); return PluginResult::OK; } @@ -82,10 +82,10 @@ namespace QuickMedia { return SearchResult::OK; } - PluginResult HotExamplesSearchPage::submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) { + PluginResult HotExamplesSearchPage::submit(const SubmitArgs &args, std::vector<Tab> &result_tabs) { BodyItems result_items; std::string website_data; - DownloadResult download_result = download_to_string(url, website_data, {}, true); + DownloadResult download_result = download_to_string(args.url, website_data, {}, true); if(download_result != DownloadResult::OK) return download_result_to_plugin_result(download_result); QuickMediaHtmlSearch html_search; @@ -134,7 +134,7 @@ namespace QuickMedia { auto body = create_body(); body->set_items(std::move(result_items)); - result_tabs.push_back({ std::move(body), std::make_unique<HotExamplesCodeExamplesPage>(program, title + " code examples"), create_search_bar("Search...", SEARCH_DELAY_FILTER) }); + result_tabs.push_back({ std::move(body), std::make_unique<HotExamplesCodeExamplesPage>(program, args.title + " code examples"), create_search_bar("Search...", SEARCH_DELAY_FILTER) }); return PluginResult::OK; } }
\ No newline at end of file |