mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:47:34 +00:00
LibFileSystemAccessClient+Userland: Return file paths as ByteStrings
Where it was straightforward to do so, I've updated the users to also use ByteStrings for their file paths, but most of them have a temporary String::from_byte_string() call instead.
This commit is contained in:
parent
5a99a6afb4
commit
44ca55aaf8
23 changed files with 50 additions and 53 deletions
|
@ -126,10 +126,10 @@ void MainWidget::load_file(FileSystemAccessClient::File file)
|
|||
m_editor->set_text(buffer_or_error.release_value());
|
||||
m_editor->set_focus(true);
|
||||
|
||||
m_file_path = file.filename().to_byte_string();
|
||||
m_file_path = file.filename();
|
||||
update_title();
|
||||
|
||||
GUI::Application::the()->set_most_recently_open_file(file.filename().to_byte_string());
|
||||
GUI::Application::the()->set_most_recently_open_file(file.filename());
|
||||
}
|
||||
|
||||
ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
||||
|
@ -147,10 +147,10 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
|
|||
GUI::MessageBox::show(&window, ByteString::formatted("Unable to save file: {}\n"sv, result.release_error()), "Error"sv, GUI::MessageBox::Type::Error);
|
||||
return;
|
||||
}
|
||||
m_file_path = response.value().filename().to_byte_string();
|
||||
m_file_path = response.value().filename();
|
||||
update_title();
|
||||
|
||||
GUI::Application::the()->set_most_recently_open_file(response.value().filename().to_byte_string());
|
||||
GUI::Application::the()->set_most_recently_open_file(response.value().filename());
|
||||
});
|
||||
|
||||
m_save_action = GUI::CommonActions::make_save_action([&](auto&) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue