1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:17:35 +00:00

Everywhere: Rename to_{string => deprecated_string}() where applicable

This will make it easier to support both string types at the same time
while we convert code, and tracking down remaining uses.

One big exception is Value::to_string() in LibJS, where the name is
dictated by the ToString AO.
This commit is contained in:
Linus Groh 2022-12-06 01:12:49 +00:00 committed by Andreas Kling
parent 6e19ab2bbc
commit 57dc179b1f
597 changed files with 1973 additions and 1972 deletions

View file

@ -19,10 +19,10 @@ auto Launcher::Details::from_details_str(DeprecatedString const& details_str) ->
auto details = adopt_ref(*new Details);
auto json = JsonValue::from_string(details_str).release_value_but_fixme_should_propagate_errors();
auto const& obj = json.as_object();
details->executable = obj.get("executable"sv).to_string();
details->name = obj.get("name"sv).to_string();
details->executable = obj.get("executable"sv).to_deprecated_string();
details->name = obj.get("name"sv).to_deprecated_string();
if (auto type_value = obj.get_ptr("type"sv)) {
auto type_str = type_value->to_string();
auto type_str = type_value->to_deprecated_string();
if (type_str == "app")
details->launcher_type = LauncherType::Application;
else if (type_str == "userpreferred")
@ -100,12 +100,12 @@ bool Launcher::open(const URL& url, Details const& details)
Vector<DeprecatedString> Launcher::get_handlers_for_url(const URL& url)
{
return connection().get_handlers_for_url(url.to_string());
return connection().get_handlers_for_url(url.to_deprecated_string());
}
auto Launcher::get_handlers_with_details_for_url(const URL& url) -> NonnullRefPtrVector<Details>
{
auto details = connection().get_handlers_with_details_for_url(url.to_string());
auto details = connection().get_handlers_with_details_for_url(url.to_deprecated_string());
NonnullRefPtrVector<Details> handlers_with_details;
for (auto& value : details) {
handlers_with_details.append(Details::from_details_str(value));