summaryrefslogtreecommitdiff
path: root/Userland/Applications/HexEditor
diff options
context:
space:
mode:
authornetworkException <git@nwex.de>2022-09-29 01:30:58 +0200
committerLinus Groh <mail@linusgroh.de>2022-09-29 09:39:04 +0100
commit4230dbbb21ec68cbb9844130d5e90276c96d16c2 (patch)
treea2586bed833a3577a997d2e8cd5e7df232978bc1 /Userland/Applications/HexEditor
parent454bf1fde054591d1215404617126ce31b281171 (diff)
downloadserenity-4230dbbb21ec68cbb9844130d5e90276c96d16c2.zip
AK+Everywhere: Replace "protocol" with "scheme" url helpers
URL had properly named replacements for protocol(), set_protocol() and create_with_file_protocol() already. This patch removes these function and updates all call sites to use the functions named according to the specification. See https://url.spec.whatwg.org/#concept-url-scheme
Diffstat (limited to 'Userland/Applications/HexEditor')
-rw-r--r--Userland/Applications/HexEditor/HexEditorWidget.cpp2
-rw-r--r--Userland/Applications/HexEditor/main.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/HexEditor/HexEditorWidget.cpp b/Userland/Applications/HexEditor/HexEditorWidget.cpp
index 40465d2569..365aa68ee9 100644
--- a/Userland/Applications/HexEditor/HexEditorWidget.cpp
+++ b/Userland/Applications/HexEditor/HexEditorWidget.cpp
@@ -470,7 +470,7 @@ void HexEditorWidget::initialize_menubar(GUI::Window& window)
auto& help_menu = window.add_menu("&Help");
help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) {
- Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/HexEditor.md"), "/bin/Help");
+ Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/HexEditor.md"), "/bin/Help");
}));
help_menu.add_action(GUI::CommonActions::make_about_action("Hex Editor", GUI::Icon::default_icon("app-hex-editor"sv), &window));
}
diff --git a/Userland/Applications/HexEditor/main.cpp b/Userland/Applications/HexEditor/main.cpp
index 8a262f8d5a..5dbf1e1c89 100644
--- a/Userland/Applications/HexEditor/main.cpp
+++ b/Userland/Applications/HexEditor/main.cpp
@@ -24,7 +24,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = TRY(GUI::Application::try_create(arguments));
- TRY(Desktop::Launcher::add_allowed_handler_with_only_specific_urls("/bin/Help", { URL::create_with_file_protocol("/usr/share/man/man1/HexEditor.md") }));
+ TRY(Desktop::Launcher::add_allowed_handler_with_only_specific_urls("/bin/Help", { URL::create_with_file_scheme("/usr/share/man/man1/HexEditor.md") }));
TRY(Desktop::Launcher::seal_allowlist());
Config::pledge_domain("HexEditor");