summaryrefslogtreecommitdiff
path: root/Userland/Applets
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-11-06 16:25:29 +0100
committerAndreas Kling <kling@serenityos.org>2021-11-08 00:35:27 +0100
commit235f39e449ebffed26114c7166b0b632a3f2232e (patch)
tree3f61715fe8ba3e801803bde270ca4aeca74fd9f5 /Userland/Applets
parent16f064d9bea97b499843e1a90a545a738d9c35fd (diff)
downloadserenity-235f39e449ebffed26114c7166b0b632a3f2232e.zip
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().
Diffstat (limited to 'Userland/Applets')
-rw-r--r--Userland/Applets/Audio/main.cpp10
-rw-r--r--Userland/Applets/Network/main.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/Userland/Applets/Audio/main.cpp b/Userland/Applets/Audio/main.cpp
index 9df2c85ea2..d0dc1b6fff 100644
--- a/Userland/Applets/Audio/main.cpp
+++ b/Userland/Applets/Audio/main.cpp
@@ -46,11 +46,11 @@ public:
update();
};
- m_volume_level_bitmaps.append({ 66, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-high.png") });
- m_volume_level_bitmaps.append({ 33, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-medium.png") });
- m_volume_level_bitmaps.append({ 1, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-low.png") });
- m_volume_level_bitmaps.append({ 0, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-zero.png") });
- m_volume_level_bitmaps.append({ 0, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-muted.png") });
+ m_volume_level_bitmaps.append({ 66, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-high.png").release_value_but_fixme_should_propagate_errors() });
+ m_volume_level_bitmaps.append({ 33, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-medium.png").release_value_but_fixme_should_propagate_errors() });
+ m_volume_level_bitmaps.append({ 1, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-low.png").release_value_but_fixme_should_propagate_errors() });
+ m_volume_level_bitmaps.append({ 0, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-zero.png").release_value_but_fixme_should_propagate_errors() });
+ m_volume_level_bitmaps.append({ 0, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/audio-volume-muted.png").release_value_but_fixme_should_propagate_errors() });
m_slider_window = add<GUI::Window>(window());
m_slider_window->set_frameless(true);
diff --git a/Userland/Applets/Network/main.cpp b/Userland/Applets/Network/main.cpp
index fd06555704..59e554a073 100644
--- a/Userland/Applets/Network/main.cpp
+++ b/Userland/Applets/Network/main.cpp
@@ -151,8 +151,8 @@ private:
String m_adapter_info;
bool m_connected = false;
bool m_notifications = true;
- RefPtr<Gfx::Bitmap> m_connected_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/network.png");
- RefPtr<Gfx::Bitmap> m_disconnected_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/network-disconnected.png");
+ RefPtr<Gfx::Bitmap> m_connected_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/network.png").release_value_but_fixme_should_propagate_errors();
+ RefPtr<Gfx::Bitmap> m_disconnected_icon = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/network-disconnected.png").release_value_but_fixme_should_propagate_errors();
};
int main(int argc, char* argv[])