mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:17:44 +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
|
@ -24,7 +24,7 @@
|
|||
|
||||
namespace WindowServer {
|
||||
|
||||
static DeprecatedString default_window_icon_path()
|
||||
static ByteString default_window_icon_path()
|
||||
{
|
||||
return "/res/icons/16x16/window.png";
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ void Window::destroy()
|
|||
set_visible(false);
|
||||
}
|
||||
|
||||
void Window::set_title(DeprecatedString const& title)
|
||||
void Window::set_title(ByteString const& title)
|
||||
{
|
||||
if (m_title == title)
|
||||
return;
|
||||
|
@ -1136,17 +1136,17 @@ void Window::set_modified(bool modified)
|
|||
frame().invalidate_titlebar();
|
||||
}
|
||||
|
||||
DeprecatedString Window::computed_title() const
|
||||
ByteString Window::computed_title() const
|
||||
{
|
||||
DeprecatedString title = m_title.replace("[*]"sv, is_modified() ? " (*)"sv : ""sv, ReplaceMode::FirstOnly);
|
||||
ByteString title = m_title.replace("[*]"sv, is_modified() ? " (*)"sv : ""sv, ReplaceMode::FirstOnly);
|
||||
if (m_title_username.has_value())
|
||||
title = DeprecatedString::formatted("{} [{}]", title, m_title_username.value());
|
||||
title = ByteString::formatted("{} [{}]", title, m_title_username.value());
|
||||
if (client() && client()->is_unresponsive())
|
||||
return DeprecatedString::formatted("{} (Not responding)", title);
|
||||
return ByteString::formatted("{} (Not responding)", title);
|
||||
return title;
|
||||
}
|
||||
|
||||
ErrorOr<Optional<DeprecatedString>> Window::compute_title_username(ConnectionFromClient* client)
|
||||
ErrorOr<Optional<ByteString>> Window::compute_title_username(ConnectionFromClient* client)
|
||||
{
|
||||
if (!client)
|
||||
return Error::from_string_literal("Tried to compute title username without a client");
|
||||
|
@ -1160,7 +1160,7 @@ ErrorOr<Optional<DeprecatedString>> Window::compute_title_username(ConnectionFro
|
|||
if (!login_session_stat.has_value())
|
||||
return Error::from_string_literal("Failed to find login process stat");
|
||||
if (login_session_stat.value().uid == client_stat.value().uid)
|
||||
return Optional<DeprecatedString> {};
|
||||
return Optional<ByteString> {};
|
||||
return client_stat.value().username;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue