mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:47:35 +00:00
Applets/Network: Propagate errors with try_set_main_widget
Use try_set_main_widget instead of set_main_widget.
This commit is contained in:
parent
43ecf1d429
commit
f125d52622
1 changed files with 2 additions and 2 deletions
|
@ -183,8 +183,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
window->set_window_type(GUI::WindowType::Applet);
|
||||
window->set_has_alpha_channel(true);
|
||||
window->resize(16, 16);
|
||||
auto& icon = window->set_main_widget<NetworkWidget>(display_notifications);
|
||||
icon.load_from_file("/res/icons/16x16/network.png");
|
||||
auto icon = TRY(window->try_set_main_widget<NetworkWidget>(display_notifications));
|
||||
icon->load_from_file("/res/icons/16x16/network.png");
|
||||
window->resize(16, 16);
|
||||
window->show();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue