mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:57:44 +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:
parent
6e19ab2bbc
commit
57dc179b1f
597 changed files with 1973 additions and 1972 deletions
|
@ -24,7 +24,7 @@ bool ContentFilter::is_filtered(const AK::URL& url) const
|
|||
if (url.scheme() == "data")
|
||||
return false;
|
||||
|
||||
auto url_string = url.to_string();
|
||||
auto url_string = url.to_deprecated_string();
|
||||
|
||||
for (auto& pattern : m_patterns) {
|
||||
if (url_string.matches(pattern.text, CaseSensitivity::CaseSensitive))
|
||||
|
@ -41,7 +41,7 @@ void ContentFilter::add_pattern(DeprecatedString const& pattern)
|
|||
builder.append(pattern);
|
||||
if (!pattern.ends_with('*'))
|
||||
builder.append('*');
|
||||
m_patterns.empend(builder.to_string());
|
||||
m_patterns.empend(builder.to_deprecated_string());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -150,7 +150,7 @@ static bool build_image_document(DOM::Document& document, ByteBuffer const& data
|
|||
MUST(html_element->append_child(body_element));
|
||||
|
||||
auto image_element = document.create_element("img").release_value();
|
||||
MUST(image_element->set_attribute(HTML::AttributeNames::src, document.url().to_string()));
|
||||
MUST(image_element->set_attribute(HTML::AttributeNames::src, document.url().to_deprecated_string()));
|
||||
MUST(body_element->append_child(image_element));
|
||||
|
||||
return true;
|
||||
|
@ -342,7 +342,7 @@ void FrameLoader::load_error_page(const AK::URL& failed_url, DeprecatedString co
|
|||
VERIFY(!data.is_null());
|
||||
StringBuilder builder;
|
||||
SourceGenerator generator { builder };
|
||||
generator.set("failed_url", escape_html_entities(failed_url.to_string()));
|
||||
generator.set("failed_url", escape_html_entities(failed_url.to_deprecated_string()));
|
||||
generator.set("error", escape_html_entities(error));
|
||||
generator.append(data);
|
||||
load_html(generator.as_string_view(), failed_url);
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
{
|
||||
auto body_hash = string_hash((char const*)m_body.data(), m_body.size());
|
||||
auto body_and_headers_hash = pair_int_hash(body_hash, m_headers.hash());
|
||||
auto url_and_method_hash = pair_int_hash(m_url.to_string().hash(), m_method.hash());
|
||||
auto url_and_method_hash = pair_int_hash(m_url.to_deprecated_string().hash(), m_method.hash());
|
||||
return pair_int_hash(body_and_headers_hash, url_and_method_hash);
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ Web::ProxyMappings& Web::ProxyMappings::the()
|
|||
|
||||
Core::ProxyData Web::ProxyMappings::proxy_for_url(AK::URL const& url) const
|
||||
{
|
||||
auto url_string = url.to_string();
|
||||
auto url_string = url.to_deprecated_string();
|
||||
for (auto& it : m_mappings) {
|
||||
if (url_string.matches(it.key)) {
|
||||
auto result = Core::ProxyData::parse_url(m_proxies[it.value]);
|
||||
|
|
|
@ -122,7 +122,7 @@ static DeprecatedString sanitized_url_for_logging(AK::URL const& url)
|
|||
{
|
||||
if (url.scheme() == "data"sv)
|
||||
return DeprecatedString::formatted("[data URL, mime-type={}, size={}]", url.data_mime_type(), url.data_payload().length());
|
||||
return url.to_string();
|
||||
return url.to_deprecated_string();
|
||||
}
|
||||
|
||||
static void emit_signpost(DeprecatedString const& message, int id)
|
||||
|
@ -307,7 +307,7 @@ void ResourceLoader::load(LoadRequest& request, Function<void(ReadonlyBytes, Has
|
|||
error_builder.append("Load failed"sv);
|
||||
log_failure(request, error_builder.string_view());
|
||||
if (error_callback)
|
||||
error_callback(error_builder.to_string(), status_code);
|
||||
error_callback(error_builder.to_deprecated_string(), status_code);
|
||||
return;
|
||||
}
|
||||
log_success(request);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue