From 7e4db556ebd2f43a3dae1aff5213e9320b609b73 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Sat, 6 May 2023 15:54:35 +0200 Subject: [PATCH] ThemeEditor: Remove one usage of DeprecatedString Up until 3d53dc82283e7eccf7a27918dbbcd391dc4988f7, to_string(ColorRole) returned char*, which prevented us from directly creating a String class. --- Userland/Applications/ThemeEditor/MainWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/ThemeEditor/MainWidget.cpp b/Userland/Applications/ThemeEditor/MainWidget.cpp index a721bfc6b7..eec9aecbec 100644 --- a/Userland/Applications/ThemeEditor/MainWidget.cpp +++ b/Userland/Applications/ThemeEditor/MainWidget.cpp @@ -489,7 +489,7 @@ ErrorOr MainWidget::add_property_tab(PropertyTab const& property_tab) TRY(row_widget->load_from_gml(flag_property_gml)); auto& checkbox = *row_widget->find_descendant_of_type_named("checkbox"); - checkbox.set_text(String::from_deprecated_string(DeprecatedString(to_string(role))).release_value_but_fixme_should_propagate_errors()); + checkbox.set_text(TRY(String::from_utf8(to_string(role)))); checkbox.on_checked = [&, role](bool checked) { set_flag(role, checked); };