mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:57:36 +00:00
Everywhere: Rename {Deprecated => Byte}String
This commit un-deprecates DeprecatedString, and repurposes it as a byte string. As the null state has already been removed, there are no other particularly hairy blockers in repurposing this type as a byte string (what it _really_ is). This commit is auto-generated: $ xs=$(ack -l \bDeprecatedString\b\|deprecated_string AK Userland \ Meta Ports Ladybird Tests Kernel) $ perl -pie 's/\bDeprecatedString\b/ByteString/g; s/deprecated_string/byte_string/g' $xs $ clang-format --style=file -i \ $(git diff --name-only | grep \.cpp\|\.h) $ gn format $(git ls-files '*.gn' '*.gni')
This commit is contained in:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -2,5 +2,5 @@
|
|||
|
||||
endpoint ClipboardClient
|
||||
{
|
||||
clipboard_data_changed([UTF8] DeprecatedString mime_type) =|
|
||||
clipboard_data_changed([UTF8] ByteString mime_type) =|
|
||||
}
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
endpoint ClipboardServer
|
||||
{
|
||||
get_clipboard_data() => (Core::AnonymousBuffer data, [UTF8] DeprecatedString mime_type, HashMap<DeprecatedString,DeprecatedString> metadata)
|
||||
set_clipboard_data(Core::AnonymousBuffer data, [UTF8] DeprecatedString mime_type, HashMap<DeprecatedString,DeprecatedString> metadata) =|
|
||||
get_clipboard_data() => (Core::AnonymousBuffer data, [UTF8] ByteString mime_type, HashMap<ByteString,ByteString> metadata)
|
||||
set_clipboard_data(Core::AnonymousBuffer data, [UTF8] ByteString mime_type, HashMap<ByteString,ByteString> metadata) =|
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ void ConnectionFromClient::die()
|
|||
s_connections.remove(client_id());
|
||||
}
|
||||
|
||||
void ConnectionFromClient::set_clipboard_data(Core::AnonymousBuffer const& data, DeprecatedString const& mime_type, HashMap<DeprecatedString, DeprecatedString> const& metadata)
|
||||
void ConnectionFromClient::set_clipboard_data(Core::AnonymousBuffer const& data, ByteString const& mime_type, HashMap<ByteString, ByteString> const& metadata)
|
||||
{
|
||||
Storage::the().set_data(data, mime_type, metadata);
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ private:
|
|||
explicit ConnectionFromClient(NonnullOwnPtr<Core::LocalSocket>, int client_id);
|
||||
|
||||
virtual Messages::ClipboardServer::GetClipboardDataResponse get_clipboard_data() override;
|
||||
virtual void set_clipboard_data(Core::AnonymousBuffer const&, DeprecatedString const&, HashMap<DeprecatedString, DeprecatedString> const&) override;
|
||||
virtual void set_clipboard_data(Core::AnonymousBuffer const&, ByteString const&, HashMap<ByteString, ByteString> const&) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ Storage& Storage::the()
|
|||
return s_the;
|
||||
}
|
||||
|
||||
void Storage::set_data(Core::AnonymousBuffer data, DeprecatedString const& mime_type, HashMap<DeprecatedString, DeprecatedString> const& metadata)
|
||||
void Storage::set_data(Core::AnonymousBuffer data, ByteString const& mime_type, HashMap<ByteString, ByteString> const& metadata)
|
||||
{
|
||||
m_buffer = move(data);
|
||||
m_data_size = data.size();
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/ByteString.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <LibCore/AnonymousBuffer.h>
|
||||
|
@ -20,8 +20,8 @@ public:
|
|||
|
||||
bool has_data() const { return m_buffer.is_valid(); }
|
||||
|
||||
DeprecatedString const& mime_type() const { return m_mime_type; }
|
||||
HashMap<DeprecatedString, DeprecatedString> const& metadata() const { return m_metadata; }
|
||||
ByteString const& mime_type() const { return m_mime_type; }
|
||||
HashMap<ByteString, ByteString> const& metadata() const { return m_metadata; }
|
||||
|
||||
u8 const* data() const
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ public:
|
|||
return 0;
|
||||
}
|
||||
|
||||
void set_data(Core::AnonymousBuffer, DeprecatedString const& mime_type, HashMap<DeprecatedString, DeprecatedString> const& metadata);
|
||||
void set_data(Core::AnonymousBuffer, ByteString const& mime_type, HashMap<ByteString, ByteString> const& metadata);
|
||||
|
||||
Function<void()> on_content_change;
|
||||
|
||||
|
@ -46,10 +46,10 @@ public:
|
|||
private:
|
||||
Storage() = default;
|
||||
|
||||
DeprecatedString m_mime_type;
|
||||
ByteString m_mime_type;
|
||||
Core::AnonymousBuffer m_buffer;
|
||||
size_t m_data_size { 0 };
|
||||
HashMap<DeprecatedString, DeprecatedString> m_metadata;
|
||||
HashMap<ByteString, ByteString> m_metadata;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue