1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:07:44 +00:00

Userland: Always construct Application with try_create()

This commit is contained in:
Sam Atkins 2022-04-16 17:17:39 +01:00 committed by Andreas Kling
parent cd7037afd5
commit 73552c1856
22 changed files with 22 additions and 22 deletions

View file

@ -356,7 +356,7 @@ bool GLContextWidget::load_file(Core::File& file)
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath unix prot_exec"));

View file

@ -207,7 +207,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return 0;
}
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
auto window = GUI::Window::construct();
window->set_minimizable(false);

View file

@ -66,7 +66,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);
auto app = TRY(GUI::Application::try_create(arguments));
Config::pledge_domain("Browser");
Config::monitor_domain("Browser");

View file

@ -25,7 +25,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::pledge("stdio getkeymap thread rpath cpath wpath recvfd sendfd unix"));
auto app = GUI::Application::construct(arguments.argc, arguments.argv);
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::pledge("stdio getkeymap thread rpath cpath wpath recvfd sendfd"));

View file

@ -18,7 +18,7 @@
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio cpath rpath recvfd sendfd unix"));
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::pledge("stdio cpath rpath recvfd sendfd"));
TRY(Core::System::unveil("/res", "r"));

View file

@ -20,7 +20,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix inet"));
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
Config::pledge_domain("Mail");

View file

@ -29,7 +29,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio thread rpath cpath wpath recvfd sendfd unix"));
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
TrackManager track_manager;

View file

@ -23,7 +23,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio thread recvfd sendfd rpath unix wpath cpath"));
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
Config::pledge_domain("PixelPaint");
char const* image_file = nullptr;

View file

@ -302,7 +302,7 @@ static String get_absolute_path_to_selected_node(SpaceAnalyzer::TreeMapWidget co
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
RefPtr<Tree> tree = adopt_ref(*new Tree(""));

View file

@ -28,7 +28,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio recvfd sendfd rpath fattr unix cpath wpath thread"));
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
char const* filename = nullptr;

View file

@ -161,7 +161,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
{
TRY(Core::System::pledge("stdio recvfd sendfd thread rpath cpath wpath unix"));
auto app = GUI::Application::construct(arguments);
auto app = TRY(GUI::Application::try_create(arguments));
char const* file_to_edit = nullptr;