diff options
author | Mustafa Quraish <mustafaq9@gmail.com> | 2021-11-22 19:11:16 -0500 |
---|---|---|
committer | Brian Gianforcaro <b.gianfo@gmail.com> | 2021-11-22 21:13:42 -0800 |
commit | 4d302e0e88bd1801e581debcf2fa87ce322e5f3b (patch) | |
tree | 58a262d053e43df197dfd25692e46042649fae8b | |
parent | 2fbcab46bfef7a020fbded228e78a627fe08b74c (diff) | |
download | serenity-4d302e0e88bd1801e581debcf2fa87ce322e5f3b.zip |
Everywhere: Use Application::construct() with Main::Arguments directly
Use the updated API everywhere we are currently manually passing in
`arguments.argc` and `arguments.argv`.
-rw-r--r-- | Userland/Applets/ResourceGraph/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/3DFileViewer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Browser/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/FileManager/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Mail/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/PDFViewer/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Piano/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/PixelPaint/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Applications/Terminal/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Demos/Starfield/Starfield.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/2048/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/Breakout/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/Chess/main.cpp | 2 | ||||
-rw-r--r-- | Userland/Games/Minesweeper/main.cpp | 2 |
14 files changed, 14 insertions, 14 deletions
diff --git a/Userland/Applets/ResourceGraph/main.cpp b/Userland/Applets/ResourceGraph/main.cpp index 48008c1328..402ca85f1f 100644 --- a/Userland/Applets/ResourceGraph/main.cpp +++ b/Userland/Applets/ResourceGraph/main.cpp @@ -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)); diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp index eafe362978..d9bdb12e24 100644 --- a/Userland/Applications/3DFileViewer/main.cpp +++ b/Userland/Applications/3DFileViewer/main.cpp @@ -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)); diff --git a/Userland/Applications/Browser/main.cpp b/Userland/Applications/Browser/main.cpp index ec10151c6c..9677c2f483 100644 --- a/Userland/Applications/Browser/main.cpp +++ b/Userland/Applications/Browser/main.cpp @@ -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"); diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index 32d83522aa..28f5f18235 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -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)); diff --git a/Userland/Applications/Mail/main.cpp b/Userland/Applications/Mail/main.cpp index 3238ab055b..c2f56bced9 100644 --- a/Userland/Applications/Mail/main.cpp +++ b/Userland/Applications/Mail/main.cpp @@ -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"); diff --git a/Userland/Applications/PDFViewer/main.cpp b/Userland/Applications/PDFViewer/main.cpp index 851afb9a44..7f608e1a14 100644 --- a/Userland/Applications/PDFViewer/main.cpp +++ b/Userland/Applications/PDFViewer/main.cpp @@ -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(); diff --git a/Userland/Applications/Piano/main.cpp b/Userland/Applications/Piano/main.cpp index 53f322e393..04eada0410 100644 --- a/Userland/Applications/Piano/main.cpp +++ b/Userland/Applications/Piano/main.cpp @@ -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; diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp index 8df96ed6bf..98e62aff3f 100644 --- a/Userland/Applications/PixelPaint/main.cpp +++ b/Userland/Applications/PixelPaint/main.cpp @@ -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; diff --git a/Userland/Applications/Terminal/main.cpp b/Userland/Applications/Terminal/main.cpp index 0858631d0f..78831be5d2 100644 --- a/Userland/Applications/Terminal/main.cpp +++ b/Userland/Applications/Terminal/main.cpp @@ -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)); diff --git a/Userland/Demos/Starfield/Starfield.cpp b/Userland/Demos/Starfield/Starfield.cpp index 42884aca81..0f04f5cd5d 100644 --- a/Userland/Demos/Starfield/Starfield.cpp +++ b/Userland/Demos/Starfield/Starfield.cpp @@ -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)); diff --git a/Userland/Games/2048/main.cpp b/Userland/Games/2048/main.cpp index b428be3f74..989d318a57 100644 --- a/Userland/Games/2048/main.cpp +++ b/Userland/Games/2048/main.cpp @@ -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(); diff --git a/Userland/Games/Breakout/main.cpp b/Userland/Games/Breakout/main.cpp index ef8a28997c..54628c28d5 100644 --- a/Userland/Games/Breakout/main.cpp +++ b/Userland/Games/Breakout/main.cpp @@ -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)); diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp index 4155679b23..9408ffe9c5 100644 --- a/Userland/Games/Chess/main.cpp +++ b/Userland/Games/Chess/main.cpp @@ -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"); diff --git a/Userland/Games/Minesweeper/main.cpp b/Userland/Games/Minesweeper/main.cpp index 3bbdbec59e..889fa9e0bc 100644 --- a/Userland/Games/Minesweeper/main.cpp +++ b/Userland/Games/Minesweeper/main.cpp @@ -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"); |