1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

LibGUI+Userland: Port Labels to String

This commit is contained in:
thankyouverycool 2023-04-29 10:41:48 -04:00 committed by Andreas Kling
parent 3d53dc8228
commit 91bafc2653
92 changed files with 240 additions and 242 deletions

View file

@ -18,7 +18,7 @@ ErrorOr<NonnullRefPtr<ProgressWindow>> ProgressWindow::try_create(StringView tit
main_widget->set_fill_with_background_color(true);
TRY(main_widget->try_set_layout<GUI::VerticalBoxLayout>());
auto label = TRY(main_widget->try_add<GUI::Label>("Analyzing storage space..."));
auto label = TRY(main_widget->try_add<GUI::Label>(TRY("Analyzing storage space..."_string)));
label->set_fixed_height(22);
window->m_progress_label = TRY(main_widget->try_add<GUI::Label>());
@ -42,7 +42,7 @@ ProgressWindow::~ProgressWindow() = default;
void ProgressWindow::update_progress_label(size_t files_encountered_count)
{
m_progress_label->set_text(DeprecatedString::formatted("{} files...", files_encountered_count));
m_progress_label->set_text(String::formatted("{} files...", files_encountered_count).release_value_but_fixme_should_propagate_errors());
// FIXME: Why is this necessary to make the window repaint?
Core::EventLoop::current().pump(Core::EventLoop::WaitMode::PollForEvents);
}