mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
Spider: Replace construct() with TRY(try_create()) pattern
This commit is contained in:
parent
302784ebf8
commit
2efec90fb7
Notes:
sideshowbarker
2024-07-18 00:44:44 +09:00
Author: https://github.com/pmhpereira Commit: https://github.com/SerenityOS/serenity/commit/2efec90fb72 Pull-request: https://github.com/SerenityOS/serenity/pull/11053
@ -41,7 +41,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||||||
{
|
{
|
||||||
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix", nullptr));
|
TRY(Core::System::pledge("stdio recvfd sendfd rpath unix", nullptr));
|
||||||
|
|
||||||
auto app = GUI::Application::construct(arguments);
|
auto app = TRY(GUI::Application::try_create(arguments));
|
||||||
auto app_icon = GUI::Icon::default_icon("app-spider");
|
auto app_icon = GUI::Icon::default_icon("app-spider");
|
||||||
|
|
||||||
Config::pledge_domains("Spider");
|
Config::pledge_domains("Spider");
|
||||||
@ -51,7 +51,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||||||
TRY(Core::System::unveil("/res", "r"));
|
TRY(Core::System::unveil("/res", "r"));
|
||||||
TRY(Core::System::unveil(nullptr, nullptr));
|
TRY(Core::System::unveil(nullptr, nullptr));
|
||||||
|
|
||||||
auto window = GUI::Window::construct();
|
auto window = TRY(GUI::Window::try_create());
|
||||||
window->set_title("Spider");
|
window->set_title("Spider");
|
||||||
|
|
||||||
auto mode = static_cast<Spider::Mode>(Config::read_i32("Spider", "Settings", "Mode", static_cast<int>(Spider::Mode::SingleSuit)));
|
auto mode = static_cast<Spider::Mode>(Config::read_i32("Spider", "Settings", "Mode", static_cast<int>(Spider::Mode::SingleSuit)));
|
||||||
|
Loading…
Reference in New Issue
Block a user