mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
FontEditor: Use String.to_uppercase
Remove the last user of Unicode::to_unicode_uppercase_full
This commit is contained in:
parent
96af80acd1
commit
d1ed04a6cb
|
@ -90,8 +90,9 @@ ErrorOr<RefPtr<GUI::Window>> MainWidget::create_preview_window()
|
|||
|
||||
m_preview_textbox = find_descendant_of_type_named<GUI::TextBox>("preview_textbox");
|
||||
m_preview_textbox->on_change = [this] {
|
||||
auto maybe_preview = [](StringView text) -> ErrorOr<String> {
|
||||
return TRY(String::formatted("{}\n{}", text, TRY(Unicode::to_unicode_uppercase_full(text))));
|
||||
auto maybe_preview = [](DeprecatedString const& deprecated_text) -> ErrorOr<String> {
|
||||
auto text = TRY(String::from_deprecated_string(deprecated_text));
|
||||
return TRY(String::formatted("{}\n{}", text, TRY(text.to_uppercase())));
|
||||
}(m_preview_textbox->text());
|
||||
if (maybe_preview.is_error())
|
||||
return show_error(maybe_preview.release_error(), "Formatting preview text failed"sv);
|
||||
|
|
Loading…
Reference in a new issue