mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
Userland: Use MUST()
to unwrap String values
This commit is contained in:
parent
2331d2bafa
commit
cfbd14b958
|
@ -104,7 +104,7 @@ ErrorOr<void> PropertiesWindow::create_widgets(bool disable_rename)
|
|||
m_directory_statistics_calculator->on_update = [this, origin_event_loop = &Core::EventLoop::current()](off_t total_size_in_bytes, size_t file_count, size_t directory_count) {
|
||||
origin_event_loop->deferred_invoke([=, weak_this = make_weak_ptr<PropertiesWindow>()] {
|
||||
if (auto strong_this = weak_this.strong_ref())
|
||||
strong_this->m_size_label->set_text(String::formatted("{}\n{} files, {} subdirectories", human_readable_size_long(total_size_in_bytes, UseThousandsSeparator::Yes), file_count, directory_count).release_value_but_fixme_should_propagate_errors());
|
||||
strong_this->m_size_label->set_text(MUST(String::formatted("{}\n{} files, {} subdirectories", human_readable_size_long(total_size_in_bytes, UseThousandsSeparator::Yes), file_count, directory_count)));
|
||||
});
|
||||
};
|
||||
m_directory_statistics_calculator->start();
|
||||
|
@ -195,10 +195,10 @@ ErrorOr<void> PropertiesWindow::create_general_tab(GUI::TabWidget& tab_widget, b
|
|||
group->set_text(String::formatted("{} ({})", group_name, st.st_gid).release_value_but_fixme_should_propagate_errors());
|
||||
|
||||
auto* created_at = general_tab.find_descendant_of_type_named<GUI::Label>("created_at");
|
||||
created_at->set_text(String::from_byte_string(GUI::FileSystemModel::timestamp_string(st.st_ctime)).release_value_but_fixme_should_propagate_errors());
|
||||
created_at->set_text(MUST(String::from_byte_string(GUI::FileSystemModel::timestamp_string(st.st_ctime))));
|
||||
|
||||
auto* last_modified = general_tab.find_descendant_of_type_named<GUI::Label>("last_modified");
|
||||
last_modified->set_text(String::from_byte_string(GUI::FileSystemModel::timestamp_string(st.st_mtime)).release_value_but_fixme_should_propagate_errors());
|
||||
last_modified->set_text(MUST(String::from_byte_string(GUI::FileSystemModel::timestamp_string(st.st_mtime))));
|
||||
|
||||
auto* owner_read = general_tab.find_descendant_of_type_named<GUI::CheckBox>("owner_read");
|
||||
auto* owner_write = general_tab.find_descendant_of_type_named<GUI::CheckBox>("owner_write");
|
||||
|
|
|
@ -160,7 +160,7 @@ ErrorOr<bool> MailWidget::connect_and_login()
|
|||
|
||||
auto& list_items = response.data().list_items();
|
||||
|
||||
m_statusbar->set_text(String::formatted("Loaded {} mailboxes", list_items.size()).release_value_but_fixme_should_propagate_errors());
|
||||
m_statusbar->set_text(MUST(String::formatted("Loaded {} mailboxes", list_items.size())));
|
||||
|
||||
m_account_holder = AccountHolder::create();
|
||||
m_account_holder->add_account_with_name_and_mailboxes(username, move(list_items));
|
||||
|
|
Loading…
Reference in a new issue