mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 14:02:51 +00:00
LibGUI+Userland: Port Labels to String
This commit is contained in:
parent
3d53dc8228
commit
91bafc2653
Notes:
sideshowbarker
2024-07-17 08:42:05 +09:00
Author: https://github.com/thankyouverycool
Commit: 91bafc2653
Pull-request: https://github.com/SerenityOS/serenity/pull/18573
92 changed files with 240 additions and 242 deletions
|
@ -22,19 +22,19 @@ void GMLPreviewWidget::load_gml(DeprecatedString const& gml)
|
|||
|
||||
if (gml.is_empty()) {
|
||||
auto& label = add<GUI::Label>();
|
||||
label.set_text("Open a .gml file to show the preview");
|
||||
label.set_text("Open a .gml file to show the preview"_string.release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Parsing errors happen while the user is typing. What should we do about them?
|
||||
(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));
|
||||
return GUI::Label::try_create(TRY(String::formatted("{} is not registered as a GML element!", name)));
|
||||
});
|
||||
|
||||
if (children().is_empty()) {
|
||||
auto& label = add<GUI::Label>();
|
||||
label.set_text("Failed to load GML!");
|
||||
label.set_text("Failed to load GML!"_string.release_value_but_fixme_should_propagate_errors());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue