mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03: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
Notes:
sideshowbarker
2024-07-17 01:00:06 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/d1ed04a6cb Pull-request: https://github.com/SerenityOS/serenity/pull/22057 Reviewed-by: https://github.com/trflynn89
@ -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 New Issue
Block a user