mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:47:46 +00:00
AK+Everywhere: Rename String to DeprecatedString
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
This commit is contained in:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -40,14 +40,14 @@ public:
|
|||
bool is_loaded() const { return m_loaded; }
|
||||
|
||||
bool is_failed() const { return m_failed; }
|
||||
String const& error() const { return m_error; }
|
||||
DeprecatedString const& error() const { return m_error; }
|
||||
|
||||
bool has_encoded_data() const { return !m_encoded_data.is_empty(); }
|
||||
|
||||
const AK::URL& url() const { return m_request.url(); }
|
||||
ByteBuffer const& encoded_data() const { return m_encoded_data; }
|
||||
|
||||
HashMap<String, String, CaseInsensitiveStringTraits> const& response_headers() const { return m_response_headers; }
|
||||
HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> const& response_headers() const { return m_response_headers; }
|
||||
|
||||
[[nodiscard]] Optional<u32> status_code() const { return m_status_code; }
|
||||
|
||||
|
@ -55,13 +55,13 @@ public:
|
|||
void unregister_client(Badge<ResourceClient>, ResourceClient&);
|
||||
|
||||
bool has_encoding() const { return m_encoding.has_value(); }
|
||||
Optional<String> const& encoding() const { return m_encoding; }
|
||||
String const& mime_type() const { return m_mime_type; }
|
||||
Optional<DeprecatedString> const& encoding() const { return m_encoding; }
|
||||
DeprecatedString const& mime_type() const { return m_mime_type; }
|
||||
|
||||
void for_each_client(Function<void(ResourceClient&)>);
|
||||
|
||||
void did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<String, String, CaseInsensitiveStringTraits> const& headers, Optional<u32> status_code);
|
||||
void did_fail(Badge<ResourceLoader>, String const& error, Optional<u32> status_code);
|
||||
void did_load(Badge<ResourceLoader>, ReadonlyBytes data, HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> const& headers, Optional<u32> status_code);
|
||||
void did_fail(Badge<ResourceLoader>, DeprecatedString const& error, Optional<u32> status_code);
|
||||
|
||||
protected:
|
||||
explicit Resource(Type, LoadRequest const&);
|
||||
|
@ -73,11 +73,11 @@ private:
|
|||
Type m_type { Type::Generic };
|
||||
bool m_loaded { false };
|
||||
bool m_failed { false };
|
||||
String m_error;
|
||||
Optional<String> m_encoding;
|
||||
DeprecatedString m_error;
|
||||
Optional<DeprecatedString> m_encoding;
|
||||
|
||||
String m_mime_type;
|
||||
HashMap<String, String, CaseInsensitiveStringTraits> m_response_headers;
|
||||
DeprecatedString m_mime_type;
|
||||
HashMap<DeprecatedString, DeprecatedString, CaseInsensitiveStringTraits> m_response_headers;
|
||||
Optional<u32> m_status_code;
|
||||
HashTable<ResourceClient*> m_clients;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue