mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +00:00
Everywhere: Use Application::construct() with Main::Arguments directly
Use the updated API everywhere we are currently manually passing in `arguments.argc` and `arguments.argv`.
This commit is contained in:
parent
2fbcab46bf
commit
4d302e0e88
14 changed files with 14 additions and 14 deletions
|
@ -187,7 +187,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(System::pledge("stdio recvfd sendfd proc exec rpath unix", nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TRY(System::pledge("stdio recvfd sendfd proc exec rpath", nullptr));
|
||||
|
||||
|
|
|
@ -284,7 +284,7 @@ bool GLContextWidget::load_file(Core::File& file, String const& filename)
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TRY(System::pledge("stdio thread recvfd sendfd rpath unix", nullptr));
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.add_positional_argument(specified_url, "URL to open", "url", Core::ArgsParser::Required::No);
|
||||
args_parser.parse(arguments);
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
Config::pledge_domains("Browser");
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.add_positional_argument(initial_location, "Path to open", "path", Core::ArgsParser::Required::No);
|
||||
args_parser.parse(arguments);
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TRY(System::pledge("stdio thread recvfd sendfd cpath rpath wpath fattr proc exec unix", nullptr));
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(System::pledge("stdio recvfd sendfd rpath unix inet", nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
Config::pledge_domains("Mail");
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
ErrorOr<int> serenity_main(Main::Arguments arguments)
|
||||
{
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
auto app_icon = GUI::Icon::default_icon("app-pdf-viewer");
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
|
|
|
@ -29,7 +29,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(System::pledge("stdio thread rpath cpath wpath recvfd sendfd unix", nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TrackManager track_manager;
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(System::pledge("stdio thread recvfd sendfd rpath unix wpath cpath", nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
Config::pledge_domains("PixelPaint");
|
||||
|
||||
const char* image_file = nullptr;
|
||||
|
|
|
@ -261,7 +261,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
TRY(System::sigaction(SIGCHLD, &act, nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TRY(System::pledge("stdio tty rpath cpath wpath recvfd sendfd proc exec unix", nullptr));
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
args_parser.add_option(speed, "Speed (default = 1)", "speed", 's', "number");
|
||||
args_parser.parse(arguments);
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TRY(System::pledge("stdio recvfd sendfd rpath", nullptr));
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
srand(time(nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
auto app_icon = GUI::Icon::default_icon("app-2048");
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
|
|
|
@ -18,7 +18,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(System::pledge("stdio recvfd sendfd rpath unix", nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
TRY(System::pledge("stdio recvfd sendfd rpath", nullptr));
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(System::pledge("stdio rpath wpath cpath recvfd sendfd thread proc exec unix", nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
Config::pledge_domains("Chess");
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
{
|
||||
TRY(System::pledge("stdio rpath recvfd sendfd unix", nullptr));
|
||||
|
||||
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
|
||||
auto app = GUI::Application::construct(arguments);
|
||||
|
||||
Config::pledge_domains("Minesweeper");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue