mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:47:34 +00:00
LibGfx: Remove try_
prefix from bitmap creation functions
Those don't have any non-try counterpart, so we might as well just omit it.
This commit is contained in:
parent
1971bff314
commit
82a152b696
186 changed files with 598 additions and 598 deletions
|
@ -65,7 +65,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return Error::from_string_literal("No wallpapers found");
|
||||
|
||||
auto& chosen_wallpaper_path = wallpaper_paths.at(get_random_uniform(wallpaper_paths.size()));
|
||||
auto chosen_wallpaper_bitmap = TRY(Gfx::Bitmap::try_load_from_file(chosen_wallpaper_path));
|
||||
auto chosen_wallpaper_bitmap = TRY(Gfx::Bitmap::load_from_file(chosen_wallpaper_path));
|
||||
if (!GUI::Desktop::the().set_wallpaper(chosen_wallpaper_bitmap, chosen_wallpaper_path))
|
||||
return Error::from_string_literal("Failed to set wallpaper");
|
||||
|
||||
|
@ -74,7 +74,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
if (path.is_null())
|
||||
return Error::from_string_literal("Must provide a path to a wallpaper");
|
||||
|
||||
auto wallpaper_bitmap = TRY(Gfx::Bitmap::try_load_from_file(path));
|
||||
auto wallpaper_bitmap = TRY(Gfx::Bitmap::load_from_file(path));
|
||||
if (!GUI::Desktop::the().set_wallpaper(wallpaper_bitmap, path))
|
||||
return Error::from_string_literal("Failed to set wallpaper");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue