mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:27:35 +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
|
@ -272,7 +272,7 @@ MainWidget::MainWidget()
|
|||
return;
|
||||
}
|
||||
|
||||
auto response = FileSystemAccessClient::Client::the().try_open_file(window());
|
||||
auto response = FileSystemAccessClient::Client::the().try_open_file_deprecated(window());
|
||||
if (response.is_error())
|
||||
return;
|
||||
|
||||
|
@ -303,7 +303,7 @@ MainWidget::MainWidget()
|
|||
m_save_as_action->activate();
|
||||
return;
|
||||
}
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file(window(), m_path, Core::OpenMode::Truncate | Core::OpenMode::WriteOnly);
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file_deprecated(window(), m_path, Core::OpenMode::Truncate | Core::OpenMode::WriteOnly);
|
||||
if (response.is_error())
|
||||
return;
|
||||
|
||||
|
@ -804,7 +804,7 @@ void MainWidget::drop_event(GUI::DropEvent& event)
|
|||
return;
|
||||
|
||||
// TODO: A drop event should be considered user consent for opening a file
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file(window(), urls.first().path(), Core::OpenMode::ReadOnly);
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file_deprecated(window(), urls.first().path(), Core::OpenMode::ReadOnly);
|
||||
if (response.is_error())
|
||||
return;
|
||||
read_file(*response.value());
|
||||
|
|
|
@ -74,7 +74,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
if (file_to_edit) {
|
||||
FileArgument parsed_argument(file_to_edit);
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window, parsed_argument.filename());
|
||||
auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window, parsed_argument.filename());
|
||||
|
||||
if (response.is_error()) {
|
||||
if (response.error().code() == ENOENT)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue