summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Inspector
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-21 18:02:15 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-21 18:02:15 +0200
commitc7d891765cc87ec04f8d332b93fc7c3f82521d7f (patch)
tree9d414d3ad62e0193b1b6fb0d12079e11e96e69b1 /Userland/DevTools/Inspector
parentf0409081f562b635de3a23d7babbc7348cbb970c (diff)
downloadserenity-c7d891765cc87ec04f8d332b93fc7c3f82521d7f.zip
LibGfx: Use "try_" prefix for static factory functions
Also mark them as [[nodiscard]].
Diffstat (limited to 'Userland/DevTools/Inspector')
-rw-r--r--Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp8
-rw-r--r--Userland/DevTools/Inspector/main.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp b/Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp
index 35c8136d3c..e9d8cb238d 100644
--- a/Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp
+++ b/Userland/DevTools/Inspector/RemoteObjectGraphModel.cpp
@@ -17,10 +17,10 @@ namespace Inspector {
RemoteObjectGraphModel::RemoteObjectGraphModel(RemoteProcess& process)
: m_process(process)
{
- m_object_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/inspector-object.png"));
- m_window_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/window.png"));
- m_layout_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/layout.png"));
- m_timer_icon.set_bitmap_for_size(16, Gfx::Bitmap::load_from_file("/res/icons/16x16/timer.png"));
+ m_object_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspector-object.png"));
+ m_window_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/window.png"));
+ m_layout_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/layout.png"));
+ m_timer_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/timer.png"));
}
RemoteObjectGraphModel::~RemoteObjectGraphModel()
diff --git a/Userland/DevTools/Inspector/main.cpp b/Userland/DevTools/Inspector/main.cpp
index 5da17cec5e..496b14f10f 100644
--- a/Userland/DevTools/Inspector/main.cpp
+++ b/Userland/DevTools/Inspector/main.cpp
@@ -155,7 +155,7 @@ int main(int argc, char** argv)
auto properties_tree_view_context_menu = GUI::Menu::construct("Properties Tree View");
- auto copy_bitmap = Gfx::Bitmap::load_from_file("/res/icons/16x16/edit-copy.png");
+ auto copy_bitmap = Gfx::Bitmap::try_load_from_file("/res/icons/16x16/edit-copy.png");
auto copy_property_name_action = GUI::Action::create("Copy Property Name", copy_bitmap, [&](auto&) {
GUI::Clipboard::the().set_plain_text(properties_tree_view.selection().first().data().to_string());
});