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:
parent
cd7037afd5
commit
73552c1856
22 changed files with 22 additions and 22 deletions
|
@ -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"));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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"));
|
||||
|
||||
|
|
|
@ -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"));
|
||||
|
|
|
@ -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");
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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(""));
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue