summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2022-12-17 00:58:13 +0100
committerSam Atkins <atkinssj@gmail.com>2023-01-07 10:53:43 +0000
commit247db3fdd0e96b282f5ecb1c64da7bd533245611 (patch)
tree004ccd2ac253e0a56b5bb1fecbe57767aee3db59 /Userland
parente361025cfb4857c13fc4082f349ad169ba4a9231 (diff)
downloadserenity-247db3fdd0e96b282f5ecb1c64da7bd533245611.zip
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. :^)
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/3DFileViewer/main.cpp6
-rw-r--r--Userland/Applications/HexEditor/HexEditorWidget.cpp4
-rw-r--r--Userland/Applications/HexEditor/main.cpp2
-rw-r--r--Userland/Applications/PDFViewer/PDFViewerWidget.cpp2
-rw-r--r--Userland/Applications/PDFViewer/main.cpp2
-rw-r--r--Userland/Applications/PixelPaint/ImageEditor.cpp2
-rw-r--r--Userland/Applications/PixelPaint/MainWidget.cpp6
-rw-r--r--Userland/Applications/PixelPaint/main.cpp2
-rw-r--r--Userland/Applications/Presenter/PresenterWidget.cpp2
-rw-r--r--Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp6
-rw-r--r--Userland/Applications/Spreadsheet/main.cpp2
-rw-r--r--Userland/Applications/TextEditor/MainWidget.cpp6
-rw-r--r--Userland/Applications/TextEditor/main.cpp2
-rw-r--r--Userland/Applications/ThemeEditor/MainWidget.cpp4
-rw-r--r--Userland/Applications/ThemeEditor/PreviewWidget.cpp2
-rw-r--r--Userland/Applications/ThemeEditor/main.cpp2
-rw-r--r--Userland/Demos/WidgetGallery/GalleryWidget.cpp2
-rw-r--r--Userland/DevTools/GMLPlayground/main.cpp6
-rw-r--r--Userland/Games/Chess/main.cpp2
-rw-r--r--Userland/Libraries/LibFileSystemAccessClient/Client.cpp6
-rw-r--r--Userland/Libraries/LibFileSystemAccessClient/Client.h6
-rw-r--r--Userland/Libraries/LibWebView/OutOfProcessWebView.cpp2
22 files changed, 38 insertions, 38 deletions
diff --git a/Userland/Applications/3DFileViewer/main.cpp b/Userland/Applications/3DFileViewer/main.cpp
index 9c1ed57315..f843257219 100644
--- a/Userland/Applications/3DFileViewer/main.cpp
+++ b/Userland/Applications/3DFileViewer/main.cpp
@@ -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;
diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp
index f200c4d8b4..1c5fc9025b 100644
--- a/Userland/Applications/HexEditor/HexEditorWidget.cpp
+++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp
@@ -121,7 +121,7 @@ HexEditorWidget::HexEditorWidget()
if (!request_close())
return;
- auto response = FileSystemAccessClient::Client::the().try_open_file(window(), {}, Core::StandardPaths::home_directory(), Core::OpenMode::ReadWrite);
+ auto response = FileSystemAccessClient::Client::the().try_open_file_deprecated(window(), {}, Core::StandardPaths::home_directory(), Core::OpenMode::ReadWrite);
if (response.is_error())
return;
@@ -586,7 +586,7 @@ void HexEditorWidget::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;
open_file(response.value());
diff --git a/Userland/Applications/HexEditor/main.cpp b/Userland/Applications/HexEditor/main.cpp
index cd36a0b2d2..ead97342b0 100644
--- a/Userland/Applications/HexEditor/main.cpp
+++ b/Userland/Applications/HexEditor/main.cpp
@@ -54,7 +54,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (arguments.argc > 1) {
// FIXME: Using `try_request_file_read_only_approved` doesn't work here since the file stored in the editor is only readable.
- auto response = FileSystemAccessClient::Client::the().try_request_file(window, arguments.strings[1], Core::OpenMode::ReadWrite);
+ auto response = FileSystemAccessClient::Client::the().try_request_file_deprecated(window, arguments.strings[1], Core::OpenMode::ReadWrite);
if (response.is_error())
return 1;
hex_editor_widget->open_file(response.value());
diff --git a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
index f2231e2073..6be1475080 100644
--- a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
+++ b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
@@ -211,7 +211,7 @@ void PDFViewerWidget::initialize_menubar(GUI::Window& window)
{
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())
open_file(*response.value());
}));
diff --git a/Userland/Applications/PDFViewer/main.cpp b/Userland/Applications/PDFViewer/main.cpp
index 2a3e5d689a..ba799e8820 100644
--- a/Userland/Applications/PDFViewer/main.cpp
+++ b/Userland/Applications/PDFViewer/main.cpp
@@ -47,7 +47,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->set_icon(app_icon.bitmap_for_size(16));
if (file_path) {
- auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window, file_path);
+ auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window, file_path);
if (response.is_error())
return 1;
pdf_viewer_widget->open_file(*response.value());
diff --git a/Userland/Applications/PixelPaint/ImageEditor.cpp b/Userland/Applications/PixelPaint/ImageEditor.cpp
index d8a91da810..dca4dbeb4f 100644
--- a/Userland/Applications/PixelPaint/ImageEditor.cpp
+++ b/Userland/Applications/PixelPaint/ImageEditor.cpp
@@ -710,7 +710,7 @@ void ImageEditor::save_project()
save_project_as();
return;
}
- auto response = FileSystemAccessClient::Client::the().try_request_file(window(), path(), Core::OpenMode::Truncate | Core::OpenMode::WriteOnly);
+ auto response = FileSystemAccessClient::Client::the().try_request_file_deprecated(window(), path(), Core::OpenMode::Truncate | Core::OpenMode::WriteOnly);
if (response.is_error())
return;
auto result = save_project_to_file(*response.value());
diff --git a/Userland/Applications/PixelPaint/MainWidget.cpp b/Userland/Applications/PixelPaint/MainWidget.cpp
index 987f768e9e..f09f0ccfec 100644
--- a/Userland/Applications/PixelPaint/MainWidget.cpp
+++ b/Userland/Applications/PixelPaint/MainWidget.cpp
@@ -192,7 +192,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
});
m_open_image_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;
open_image(response.value());
@@ -415,7 +415,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
}));
m_edit_menu->add_action(GUI::Action::create(
"&Load Color Palette", g_icon_bag.load_color_palette, [&](auto&) {
- auto response = FileSystemAccessClient::Client::the().try_open_file(&window, "Load Color Palette");
+ auto response = FileSystemAccessClient::Client::the().try_open_file_deprecated(&window, "Load Color Palette");
if (response.is_error())
return;
@@ -1264,7 +1264,7 @@ void MainWidget::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;
open_image(response.value());
diff --git a/Userland/Applications/PixelPaint/main.cpp b/Userland/Applications/PixelPaint/main.cpp
index 9f67d1be40..05aa370b24 100644
--- a/Userland/Applications/PixelPaint/main.cpp
+++ b/Userland/Applications/PixelPaint/main.cpp
@@ -74,7 +74,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->show();
if (image_file) {
- auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window, image_file);
+ auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window, image_file);
if (response.is_error())
return 1;
main_widget->open_image(response.value());
diff --git a/Userland/Applications/Presenter/PresenterWidget.cpp b/Userland/Applications/Presenter/PresenterWidget.cpp
index 6e2e9104e1..652bdaacd4 100644
--- a/Userland/Applications/Presenter/PresenterWidget.cpp
+++ b/Userland/Applications/Presenter/PresenterWidget.cpp
@@ -30,7 +30,7 @@ ErrorOr<void> PresenterWidget::initialize_menubar()
// Set up the menu bar.
auto& file_menu = window->add_menu("&File");
auto open_action = GUI::CommonActions::make_open_action([this](auto&) {
- auto response = FileSystemAccessClient::Client::the().try_open_file(this->window());
+ auto response = FileSystemAccessClient::Client::the().try_open_file_deprecated(this->window());
if (response.is_error())
return;
this->set_file(response.value()->filename());
diff --git a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
index 6d4668e43a..bbc9cdf66a 100644
--- a/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
+++ b/Userland/Applications/Spreadsheet/SpreadsheetWidget.cpp
@@ -127,14 +127,14 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, NonnullRefPtrVe
if (!request_close())
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;
load_file(*response.value());
});
m_import_action = GUI::Action::create("Import sheets...", [&](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;
@@ -147,7 +147,7 @@ SpreadsheetWidget::SpreadsheetWidget(GUI::Window& parent_window, NonnullRefPtrVe
return;
}
- auto response = FileSystemAccessClient::Client::the().try_request_file(window(), current_filename(), Core::OpenMode::WriteOnly);
+ auto response = FileSystemAccessClient::Client::the().try_request_file_deprecated(window(), current_filename(), Core::OpenMode::WriteOnly);
if (response.is_error())
return;
save(*response.value());
diff --git a/Userland/Applications/Spreadsheet/main.cpp b/Userland/Applications/Spreadsheet/main.cpp
index 7605622cf3..090d2ef8a9 100644
--- a/Userland/Applications/Spreadsheet/main.cpp
+++ b/Userland/Applications/Spreadsheet/main.cpp
@@ -70,7 +70,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
window->show();
if (filename) {
- auto file = TRY(FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window, filename));
+ auto file = TRY(FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window, filename));
spreadsheet_widget->load_file(file);
}
diff --git a/Userland/Applications/TextEditor/MainWidget.cpp b/Userland/Applications/TextEditor/MainWidget.cpp
index 780d283d4f..f690f3c149 100644
--- a/Userland/Applications/TextEditor/MainWidget.cpp
+++ b/Userland/Applications/TextEditor/MainWidget.cpp
@@ -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());
diff --git a/Userland/Applications/TextEditor/main.cpp b/Userland/Applications/TextEditor/main.cpp
index 00a13ed820..08034792fe 100644
--- a/Userland/Applications/TextEditor/main.cpp
+++ b/Userland/Applications/TextEditor/main.cpp
@@ -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)
diff --git a/Userland/Applications/ThemeEditor/MainWidget.cpp b/Userland/Applications/ThemeEditor/MainWidget.cpp
index c532b53f47..3344c30d1c 100644
--- a/Userland/Applications/ThemeEditor/MainWidget.cpp
+++ b/Userland/Applications/ThemeEditor/MainWidget.cpp
@@ -238,7 +238,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
TRY(file_menu->try_add_action(GUI::CommonActions::make_open_action([&](auto&) {
if (request_close() == GUI::Window::CloseRequestDecision::StayOpen)
return;
- auto response = FileSystemAccessClient::Client::the().try_open_file(&window, "Select theme file", "/res/themes"sv);
+ auto response = FileSystemAccessClient::Client::the().try_open_file_deprecated(&window, "Select theme file", "/res/themes"sv);
if (response.is_error())
return;
auto load_from_file_result = load_from_file(*response.value());
@@ -250,7 +250,7 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)
m_save_action = GUI::CommonActions::make_save_action([&](auto&) {
if (m_path.has_value()) {
- auto result = FileSystemAccessClient::Client::the().try_request_file(&window, *m_path, Core::OpenMode::ReadWrite | Core::OpenMode::Truncate);
+ auto result = FileSystemAccessClient::Client::the().try_request_file_deprecated(&window, *m_path, Core::OpenMode::ReadWrite | Core::OpenMode::Truncate);
if (result.is_error())
return;
save_to_file(result.value());
diff --git a/Userland/Applications/ThemeEditor/PreviewWidget.cpp b/Userland/Applications/ThemeEditor/PreviewWidget.cpp
index 074f7bb0a4..32867b787b 100644
--- a/Userland/Applications/ThemeEditor/PreviewWidget.cpp
+++ b/Userland/Applications/ThemeEditor/PreviewWidget.cpp
@@ -170,7 +170,7 @@ void PreviewWidget::drop_event(GUI::DropEvent& event)
return;
}
- 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;
diff --git a/Userland/Applications/ThemeEditor/main.cpp b/Userland/Applications/ThemeEditor/main.cpp
index f3273075ff..24df1bed84 100644
--- a/Userland/Applications/ThemeEditor/main.cpp
+++ b/Userland/Applications/ThemeEditor/main.cpp
@@ -53,7 +53,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
// Note: This is deferred to ensure that the window has already popped and thus proper window stealing can be performed.
app->event_loop().deferred_invoke(
[&window, &path, &main_widget]() {
- auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window, path.value());
+ auto response = FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window, path.value());
if (response.is_error())
GUI::MessageBox::show_error(window, DeprecatedString::formatted("Opening \"{}\" failed: {}", path.value(), response.error()));
else {
diff --git a/Userland/Demos/WidgetGallery/GalleryWidget.cpp b/Userland/Demos/WidgetGallery/GalleryWidget.cpp
index d8973608ae..45041e9340 100644
--- a/Userland/Demos/WidgetGallery/GalleryWidget.cpp
+++ b/Userland/Demos/WidgetGallery/GalleryWidget.cpp
@@ -108,7 +108,7 @@ GalleryWidget::GalleryWidget()
m_file_button->set_icon(Gfx::Bitmap::try_load_from_file("/res/icons/16x16/open.png"sv).release_value_but_fixme_should_propagate_errors());
m_file_button->on_click = [&](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;
m_text_editor->set_text(response.release_value()->filename());
diff --git a/Userland/DevTools/GMLPlayground/main.cpp b/Userland/DevTools/GMLPlayground/main.cpp
index c7d0f18263..a5891c0dee 100644
--- a/Userland/DevTools/GMLPlayground/main.cpp
+++ b/Userland/DevTools/GMLPlayground/main.cpp
@@ -150,7 +150,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
save_as_action->activate();
return;
}
- auto response = FileSystemAccessClient::Client::the().try_request_file(window, file_path, Core::OpenMode::Truncate | Core::OpenMode::WriteOnly);
+ auto response = FileSystemAccessClient::Client::the().try_request_file_deprecated(window, file_path, Core::OpenMode::Truncate | Core::OpenMode::WriteOnly);
if (response.is_error())
return;
@@ -171,7 +171,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
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;
@@ -295,7 +295,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
editor->set_cursor(4, 28); // after "...widgets!"
update_title();
} else {
- auto file = TRY(FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window, path));
+ auto file = TRY(FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window, path));
file_path = path;
editor->set_text(file->read_all());
update_title();
diff --git a/Userland/Games/Chess/main.cpp b/Userland/Games/Chess/main.cpp
index 8e40931ec3..273e2ba679 100644
--- a/Userland/Games/Chess/main.cpp
+++ b/Userland/Games/Chess/main.cpp
@@ -67,7 +67,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(game_menu->try_add_separator());
TRY(game_menu->try_add_action(GUI::Action::create("&Import PGN...", { Mod_Ctrl, Key_O }, [&](auto&) {
- auto result = FileSystemAccessClient::Client::the().try_open_file(window);
+ auto result = FileSystemAccessClient::Client::the().try_open_file_deprecated(window);
if (result.is_error())
return;
diff --git a/Userland/Libraries/LibFileSystemAccessClient/Client.cpp b/Userland/Libraries/LibFileSystemAccessClient/Client.cpp
index 43ff22174a..3f6fcbcfd5 100644
--- a/Userland/Libraries/LibFileSystemAccessClient/Client.cpp
+++ b/Userland/Libraries/LibFileSystemAccessClient/Client.cpp
@@ -23,7 +23,7 @@ Client& Client::the()
return *s_the;
}
-DeprecatedResult Client::try_request_file_read_only_approved(GUI::Window* parent_window, DeprecatedString const& path)
+DeprecatedResult Client::try_request_file_read_only_approved_deprecated(GUI::Window* parent_window, DeprecatedString const& path)
{
auto const id = get_new_id();
m_promises.set(id, PromiseAndWindow { { Core::Promise<DeprecatedResult>::construct() }, parent_window });
@@ -69,7 +69,7 @@ static Core::Stream::OpenMode to_stream_open_mode(Core::OpenMode open_mode)
return result;
}
-DeprecatedResult Client::try_request_file(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode deprecated_mode)
+DeprecatedResult Client::try_request_file_deprecated(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode deprecated_mode)
{
auto const id = get_new_id();
m_promises.set(id, PromiseAndWindow { { Core::Promise<DeprecatedResult>::construct() }, parent_window });
@@ -96,7 +96,7 @@ DeprecatedResult Client::try_request_file(GUI::Window* parent_window, Deprecated
return handle_promise<DeprecatedResult>(id);
}
-DeprecatedResult Client::try_open_file(GUI::Window* parent_window, DeprecatedString const& window_title, StringView path, Core::OpenMode deprecated_requested_access)
+DeprecatedResult Client::try_open_file_deprecated(GUI::Window* parent_window, DeprecatedString const& window_title, StringView path, Core::OpenMode deprecated_requested_access)
{
auto const id = get_new_id();
m_promises.set(id, PromiseAndWindow { { Core::Promise<DeprecatedResult>::construct() }, parent_window });
diff --git a/Userland/Libraries/LibFileSystemAccessClient/Client.h b/Userland/Libraries/LibFileSystemAccessClient/Client.h
index 43ae92e8c8..93e88aa24b 100644
--- a/Userland/Libraries/LibFileSystemAccessClient/Client.h
+++ b/Userland/Libraries/LibFileSystemAccessClient/Client.h
@@ -27,9 +27,9 @@ class Client final
IPC_CLIENT_CONNECTION(Client, "/tmp/session/%sid/portal/filesystemaccess"sv)
public:
- DeprecatedResult try_request_file_read_only_approved(GUI::Window* parent_window, DeprecatedString const& path);
- DeprecatedResult try_request_file(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode mode);
- DeprecatedResult try_open_file(GUI::Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::OpenMode requested_access = Core::OpenMode::ReadOnly);
+ DeprecatedResult try_request_file_read_only_approved_deprecated(GUI::Window* parent_window, DeprecatedString const& path);
+ DeprecatedResult try_request_file_deprecated(GUI::Window* parent_window, DeprecatedString const& path, Core::OpenMode mode);
+ DeprecatedResult try_open_file_deprecated(GUI::Window* parent_window, DeprecatedString const& window_title = {}, StringView path = Core::StandardPaths::home_directory(), Core::OpenMode requested_access = Core::OpenMode::ReadOnly);
DeprecatedResult try_save_file_deprecated(GUI::Window* parent_window, DeprecatedString const& name, DeprecatedString const ext, Core::OpenMode requested_access = Core::OpenMode::WriteOnly | Core::OpenMode::Truncate);
Result save_file(GUI::Window* parent_window, DeprecatedString const& name, DeprecatedString const ext, Core::Stream::OpenMode requested_access = Core::Stream::OpenMode::Write | Core::Stream::OpenMode::Truncate);
diff --git a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
index cf3958df0a..1f0dd054f1 100644
--- a/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
+++ b/Userland/Libraries/LibWebView/OutOfProcessWebView.cpp
@@ -522,7 +522,7 @@ Gfx::IntRect OutOfProcessWebView::notify_server_did_request_fullscreen_window()
void OutOfProcessWebView::notify_server_did_request_file(Badge<WebContentClient>, DeprecatedString const& path, i32 request_id)
{
- auto file = FileSystemAccessClient::Client::the().try_request_file_read_only_approved(window(), path);
+ auto file = FileSystemAccessClient::Client::the().try_request_file_read_only_approved_deprecated(window(), path);
if (file.is_error())
client().async_handle_file_return(file.error().code(), {}, request_id);
else