mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:48:14 +00:00
LibGfx: Use ErrorOr<T> for Bitmap::try_load_from_file()
This was used in a lot of places, so this patch makes liberal use of ErrorOr<T>::release_value_but_fixme_should_propagate_errors().
This commit is contained in:
parent
16f064d9be
commit
235f39e449
104 changed files with 412 additions and 397 deletions
|
@ -255,7 +255,7 @@ int main(int argc, char** argv)
|
|||
};
|
||||
|
||||
auto kill_action = GUI::Action::create(
|
||||
"&Kill Process", { Mod_Ctrl, Key_K }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/kill.png"), [&](const GUI::Action&) {
|
||||
"&Kill Process", { Mod_Ctrl, Key_K }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/kill.png").release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) {
|
||||
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||
if (pid != -1)
|
||||
kill(pid, SIGKILL);
|
||||
|
@ -263,7 +263,7 @@ int main(int argc, char** argv)
|
|||
&process_table_view);
|
||||
|
||||
auto stop_action = GUI::Action::create(
|
||||
"&Stop Process", { Mod_Ctrl, Key_S }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/stop-hand.png"), [&](const GUI::Action&) {
|
||||
"&Stop Process", { Mod_Ctrl, Key_S }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/stop-hand.png").release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) {
|
||||
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||
if (pid != -1)
|
||||
kill(pid, SIGSTOP);
|
||||
|
@ -271,7 +271,7 @@ int main(int argc, char** argv)
|
|||
&process_table_view);
|
||||
|
||||
auto continue_action = GUI::Action::create(
|
||||
"&Continue Process", { Mod_Ctrl, Key_C }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/continue.png"), [&](const GUI::Action&) {
|
||||
"&Continue Process", { Mod_Ctrl, Key_C }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/continue.png").release_value_but_fixme_should_propagate_errors(), [&](const GUI::Action&) {
|
||||
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||
if (pid != -1)
|
||||
kill(pid, SIGCONT);
|
||||
|
@ -280,7 +280,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto profile_action = GUI::Action::create(
|
||||
"&Profile Process", { Mod_Ctrl, Key_P },
|
||||
Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-profiler.png"), [&](auto&) {
|
||||
Gfx::Bitmap::try_load_from_file("/res/icons/16x16/app-profiler.png").release_value_but_fixme_should_propagate_errors(), [&](auto&) {
|
||||
pid_t pid = selected_id(ProcessModel::Column::PID);
|
||||
if (pid != -1) {
|
||||
auto pid_string = String::number(pid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue