mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 12:37:44 +00:00
LibFileSystemAccessClient: Rename try_* functions to try_*_deprecated
These functions return the deprecated `Core::File` class, so let's mark it as such to avoid possible confusion between future non try_* functions which will use Core::Stream family classes and to possibly grab someone's attention. :^)
This commit is contained in:
parent
e361025cfb
commit
247db3fdd0
22 changed files with 38 additions and 38 deletions
|
@ -147,7 +147,7 @@ void GLContextWidget::drop_event(GUI::DropEvent& event)
|
|||
if (url.scheme() != "file")
|
||||
continue;
|
||||
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file(window(), url.path(), Core::OpenMode::ReadOnly);
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file_deprecated(window(), url.path(), Core::OpenMode::ReadOnly);
|
||||
if (response.is_error())
|
||||
return;
|
||||
load_file(response.value());
|
||||
|
@ -339,7 +339,7 @@ bool GLContextWidget::load_file(Core::File& file)
|
|||
if (!bitmap_or_error.is_error())
|
||||
texture_image = bitmap_or_error.release_value_but_fixme_should_propagate_errors();
|
||||
} else {
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file(window(), builder.string_view(), Core::OpenMode::ReadOnly);
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file_deprecated(window(), builder.string_view(), Core::OpenMode::ReadOnly);
|
||||
if (!response.is_error()) {
|
||||
auto texture_file = response.value();
|
||||
auto bitmap_or_error = Gfx::Bitmap::try_load_from_fd_and_close(texture_file->leak_fd(), texture_file->filename());
|
||||
|
@ -398,7 +398,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto& file_menu = window->add_menu("&File");
|
||||
|
||||
file_menu.add_action(GUI::CommonActions::make_open_action([&](auto&) {
|
||||
auto response = FileSystemAccessClient::Client::the().try_open_file(window);
|
||||
auto response = FileSystemAccessClient::Client::the().try_open_file_deprecated(window);
|
||||
if (response.is_error())
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue