summaryrefslogtreecommitdiff
path: root/Userland/DevTools
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@serenityos.org>2023-01-07 12:38:23 +0000
committerLinus Groh <mail@linusgroh.de>2023-01-07 14:39:30 +0100
commitf0395a20428230ee680c6f92efd68dedd040c658 (patch)
treee391a4ef7736281c4d2c93dcba862060e935825d /Userland/DevTools
parente4e12f3a961efd5f0ce0204becd3ce762a458c4c (diff)
downloadserenity-f0395a20428230ee680c6f92efd68dedd040c658.zip
LibGUI+Userland: Rename `try_load_from_gml()` -> `load_from_gml()` :^)
It's the only one, so the `try` prefix is unnecessary now.
Diffstat (limited to 'Userland/DevTools')
-rw-r--r--Userland/DevTools/GMLPlayground/main.cpp2
-rw-r--r--Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp2
-rw-r--r--Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp2
-rw-r--r--Userland/DevTools/HackStudio/GMLPreviewWidget.cpp2
-rw-r--r--Userland/DevTools/SQLStudio/MainWidget.cpp2
5 files changed, 5 insertions, 5 deletions
diff --git a/Userland/DevTools/GMLPlayground/main.cpp b/Userland/DevTools/GMLPlayground/main.cpp
index 9efa37b4f0..bdbff1e784 100644
--- a/Userland/DevTools/GMLPlayground/main.cpp
+++ b/Userland/DevTools/GMLPlayground/main.cpp
@@ -120,7 +120,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
editor->on_change = [&] {
preview->remove_all_children();
// FIXME: Parsing errors happen while the user is typing. What should we do about them?
- (void)preview->try_load_from_gml(editor->text(), [](DeprecatedString const& class_name) -> ErrorOr<NonnullRefPtr<Core::Object>> {
+ (void)preview->load_from_gml(editor->text(), [](DeprecatedString const& class_name) -> ErrorOr<NonnullRefPtr<Core::Object>> {
return UnregisteredWidget::try_create(class_name);
});
};
diff --git a/Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp b/Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp
index 18e1cdc645..e43623bd5d 100644
--- a/Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp
+++ b/Userland/DevTools/HackStudio/Dialogs/Git/GitCommitDialog.cpp
@@ -18,7 +18,7 @@ GitCommitDialog::GitCommitDialog(GUI::Window* parent)
set_icon(parent->icon());
auto widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
- widget->try_load_from_gml(git_commit_dialog_gml).release_value_but_fixme_should_propagate_errors();
+ widget->load_from_gml(git_commit_dialog_gml).release_value_but_fixme_should_propagate_errors();
m_message_editor = widget->find_descendant_of_type_named<GUI::TextEditor>("message_editor");
m_cancel_button = widget->find_descendant_of_type_named<GUI::Button>("cancel_button");
diff --git a/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp b/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp
index 14228a6ec5..1bf96a70e8 100644
--- a/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp
+++ b/Userland/DevTools/HackStudio/Dialogs/NewProjectDialog.cpp
@@ -50,7 +50,7 @@ NewProjectDialog::NewProjectDialog(GUI::Window* parent)
set_title("New project");
auto main_widget = set_main_widget<GUI::Widget>().release_value_but_fixme_should_propagate_errors();
- main_widget->try_load_from_gml(new_project_dialog_gml).release_value_but_fixme_should_propagate_errors();
+ main_widget->load_from_gml(new_project_dialog_gml).release_value_but_fixme_should_propagate_errors();
m_icon_view_container = *main_widget->find_descendant_of_type_named<GUI::Widget>("icon_view_container");
m_icon_view = m_icon_view_container->add<GUI::IconView>();
diff --git a/Userland/DevTools/HackStudio/GMLPreviewWidget.cpp b/Userland/DevTools/HackStudio/GMLPreviewWidget.cpp
index 5144690ab4..30a6126fb0 100644
--- a/Userland/DevTools/HackStudio/GMLPreviewWidget.cpp
+++ b/Userland/DevTools/HackStudio/GMLPreviewWidget.cpp
@@ -28,7 +28,7 @@ void GMLPreviewWidget::load_gml(DeprecatedString const& gml)
}
// FIXME: Parsing errors happen while the user is typing. What should we do about them?
- (void)try_load_from_gml(gml, [](DeprecatedString const& name) -> ErrorOr<NonnullRefPtr<Core::Object>> {
+ (void)load_from_gml(gml, [](DeprecatedString const& name) -> ErrorOr<NonnullRefPtr<Core::Object>> {
return GUI::Label::try_create(DeprecatedString::formatted("{} is not registered as a GML element!", name));
});
diff --git a/Userland/DevTools/SQLStudio/MainWidget.cpp b/Userland/DevTools/SQLStudio/MainWidget.cpp
index 678373f7b6..95a2671d0a 100644
--- a/Userland/DevTools/SQLStudio/MainWidget.cpp
+++ b/Userland/DevTools/SQLStudio/MainWidget.cpp
@@ -61,7 +61,7 @@ static Vector<DeprecatedString> lookup_database_names()
MainWidget::MainWidget()
{
- try_load_from_gml(sql_studio_gml).release_value_but_fixme_should_propagate_errors();
+ load_from_gml(sql_studio_gml).release_value_but_fixme_should_propagate_errors();
m_new_action = GUI::Action::create("&New", { Mod_Ctrl, Key_N }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/new.png"sv).release_value_but_fixme_should_propagate_errors(), [this](auto&) {
open_new_script();