From 797968c310d3b13f74968ba292e0b360d6d2d9c2 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Fri, 10 Mar 2023 18:55:52 +0100 Subject: LibGUI+Userland: Make TabWidget::*add_tab() take title using new string --- Userland/Applications/CrashReporter/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Userland/Applications/CrashReporter') diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp index b6d7a5beaa..03d7c8adea 100644 --- a/Userland/Applications/CrashReporter/main.cpp +++ b/Userland/Applications/CrashReporter/main.cpp @@ -215,7 +215,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto& progressbar = *widget->find_descendant_of_type_named("progressbar"); auto& tab_widget = *widget->find_descendant_of_type_named("tab_widget"); - auto backtrace_tab = TRY(tab_widget.try_add_tab("Backtrace")); + auto backtrace_tab = TRY(tab_widget.try_add_tab(TRY("Backtrace"_string))); TRY(backtrace_tab->try_set_layout(4)); auto backtrace_label = TRY(backtrace_tab->try_add("A backtrace for each thread alive during the crash is listed below:")); @@ -225,7 +225,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto backtrace_tab_widget = TRY(backtrace_tab->try_add()); backtrace_tab_widget->set_tab_position(GUI::TabWidget::TabPosition::Bottom); - auto cpu_registers_tab = TRY(tab_widget.try_add_tab("CPU Registers")); + auto cpu_registers_tab = TRY(tab_widget.try_add_tab(TRY("CPU Registers"_string))); cpu_registers_tab->set_layout(4); auto cpu_registers_label = TRY(cpu_registers_tab->try_add("The CPU register state for each thread alive during the crash is listed below:")); @@ -235,7 +235,7 @@ ErrorOr serenity_main(Main::Arguments arguments) auto cpu_registers_tab_widget = TRY(cpu_registers_tab->try_add()); cpu_registers_tab_widget->set_tab_position(GUI::TabWidget::TabPosition::Bottom); - auto environment_tab = TRY(tab_widget.try_add_tab("Environment")); + auto environment_tab = TRY(tab_widget.try_add_tab(TRY("Environment"_string))); TRY(environment_tab->try_set_layout(4)); auto environment_text_editor = TRY(environment_tab->try_add()); @@ -244,7 +244,7 @@ ErrorOr serenity_main(Main::Arguments arguments) environment_text_editor->set_wrapping_mode(GUI::TextEditor::WrappingMode::NoWrap); environment_text_editor->set_should_hide_unnecessary_scrollbars(true); - auto memory_regions_tab = TRY(tab_widget.try_add_tab("Memory Regions")); + auto memory_regions_tab = TRY(tab_widget.try_add_tab(TRY("Memory Regions"_string))); TRY(memory_regions_tab->try_set_layout(4)); auto memory_regions_text_editor = TRY(memory_regions_tab->try_add()); @@ -309,7 +309,7 @@ ErrorOr serenity_main(Main::Arguments arguments) }, [&](auto results) -> ErrorOr { for (auto& backtrace : results.thread_backtraces) { - auto container = TRY(backtrace_tab_widget->try_add_tab(backtrace.title)); + auto container = TRY(backtrace_tab_widget->try_add_tab(TRY(String::from_deprecated_string(backtrace.title)))); TRY(container->template try_set_layout(4)); auto backtrace_text_editor = TRY(container->template try_add()); backtrace_text_editor->set_text(backtrace.text); @@ -320,7 +320,7 @@ ErrorOr serenity_main(Main::Arguments arguments) } for (auto& cpu_registers : results.thread_cpu_registers) { - auto container = TRY(cpu_registers_tab_widget->try_add_tab(cpu_registers.title)); + auto container = TRY(cpu_registers_tab_widget->try_add_tab(TRY(String::from_deprecated_string(cpu_registers.title)))); TRY(container->template try_set_layout(4)); auto cpu_registers_text_editor = TRY(container->template try_add()); cpu_registers_text_editor->set_text(cpu_registers.text); -- cgit v1.2.3