mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:17: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
|
@ -169,7 +169,7 @@ void ViewWidget::navigate(Directions direction)
|
|||
m_current_index = index;
|
||||
|
||||
auto value = result.release_value();
|
||||
open_file(value.filename(), value.stream());
|
||||
open_file(MUST(String::from_byte_string(value.filename())), value.stream());
|
||||
}
|
||||
|
||||
void ViewWidget::doubleclick_event(GUI::MouseEvent&)
|
||||
|
|
|
@ -106,7 +106,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return;
|
||||
|
||||
auto value = result.release_value();
|
||||
widget.open_file(value.filename(), value.stream());
|
||||
widget.open_file(MUST(String::from_byte_string(value.filename())), value.stream());
|
||||
|
||||
for (size_t i = 1; i < urls.size(); ++i) {
|
||||
Desktop::Launcher::open(URL::create_with_file_scheme(urls[i].serialize_path().characters()), "/bin/ImageViewer");
|
||||
|
@ -130,7 +130,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return;
|
||||
|
||||
auto value = result.release_value();
|
||||
widget.open_file(value.filename(), value.stream());
|
||||
widget.open_file(MUST(String::from_byte_string(value.filename())), value.stream());
|
||||
});
|
||||
|
||||
auto delete_action = GUI::CommonActions::make_delete_action(
|
||||
|
@ -318,7 +318,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return;
|
||||
|
||||
auto value = result.release_value();
|
||||
widget.open_file(value.filename(), value.stream());
|
||||
widget.open_file(MUST(String::from_byte_string(value.filename())), value.stream());
|
||||
});
|
||||
|
||||
file_menu->add_action(quit_action);
|
||||
|
@ -380,7 +380,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
return 1;
|
||||
|
||||
auto value = result.release_value();
|
||||
widget.open_file(value.filename(), value.stream());
|
||||
widget.open_file(MUST(String::from_byte_string(value.filename())), value.stream());
|
||||
} else {
|
||||
widget.clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue