Browser: Support opening a URL from the command line at startup

This commit is contained in:
Conrad Pankoff 2019-10-06 22:43:10 +11:00 committed by Andreas Kling
parent c4da2a49a5
commit 15a016d3e3
Notes: sideshowbarker 2024-07-19 11:47:44 +09:00

View File

@ -94,7 +94,12 @@ int main(int argc, char** argv)
window->set_main_widget(widget);
window->show();
html_widget->load("file:///home/anon/www/welcome.html");
String url_to_load = "file:///home/anon/www/welcome.html";
if (app.args().size() >= 1)
url_to_load = app.args()[0];
html_widget->load(url_to_load);
return app.exec();
}