1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 05:57:45 +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:
Ali Mohammad Pur 2023-12-16 17:49:34 +03:30 committed by Ali Mohammad Pur
parent 38d62563b3
commit 5e1499d104
1615 changed files with 10257 additions and 10257 deletions

View file

@ -5,7 +5,7 @@
*/
#include "HighlightPreviewWidget.h"
#include <AK/DeprecatedString.h>
#include <AK/ByteString.h>
#include <LibCore/ConfigFile.h>
#include <LibGUI/ConnectionToWindowServer.h>
#include <LibGUI/Painter.h>
@ -22,7 +22,7 @@ HighlightPreviewWidget::HighlightPreviewWidget(Gfx::Palette const& palette)
ErrorOr<void> HighlightPreviewWidget::reload_cursor()
{
auto cursor_theme = GUI::ConnectionToWindowServer::the().get_cursor_theme();
auto theme_path = DeprecatedString::formatted("/res/cursor-themes/{}/{}", cursor_theme, "Config.ini");
auto theme_path = ByteString::formatted("/res/cursor-themes/{}/{}", cursor_theme, "Config.ini");
auto cursor_theme_config = TRY(Core::ConfigFile::open(theme_path));
auto load_bitmap = [](StringView path, StringView default_path) {
auto maybe_bitmap = Gfx::Bitmap::load_from_file(path);
@ -31,7 +31,7 @@ ErrorOr<void> HighlightPreviewWidget::reload_cursor()
return Gfx::Bitmap::load_from_file(default_path);
};
constexpr auto default_cursor_path = "/res/cursor-themes/Default/arrow.x2y2.png"sv;
auto cursor_path = DeprecatedString::formatted("/res/cursor-themes/{}/{}",
auto cursor_path = ByteString::formatted("/res/cursor-themes/{}/{}",
cursor_theme, cursor_theme_config->read_entry("Cursor", "Arrow"));
m_cursor_bitmap = TRY(load_bitmap(cursor_path, default_cursor_path));
m_cursor_params = Gfx::CursorParams::parse_from_filename(cursor_path, m_cursor_bitmap->rect().center()).constrained(*m_cursor_bitmap);