mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17: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:
parent
38d62563b3
commit
5e1499d104
1615 changed files with 10257 additions and 10257 deletions
|
@ -170,7 +170,7 @@ void ScreenNumberOverlay::pick_font()
|
|||
auto screen_number_content_rect_size = calculate_content_rect_for_screen(Screen::main()).size();
|
||||
auto& font_database = Gfx::FontDatabase::the();
|
||||
auto& default_font = WindowManager::the().font();
|
||||
DeprecatedString best_font_name;
|
||||
ByteString best_font_name;
|
||||
int best_font_size = -1;
|
||||
font_database.for_each_font([&](Gfx::Font const& font) {
|
||||
// TODO: instead of picking *any* font we should probably compare font.name()
|
||||
|
@ -183,7 +183,7 @@ void ScreenNumberOverlay::pick_font()
|
|||
return;
|
||||
}
|
||||
}
|
||||
best_font_name = font.qualified_name().to_deprecated_string();
|
||||
best_font_name = font.qualified_name().to_byte_string();
|
||||
best_font_size = size;
|
||||
}
|
||||
});
|
||||
|
@ -212,7 +212,7 @@ Gfx::Font const& ScreenNumberOverlay::font()
|
|||
|
||||
void ScreenNumberOverlay::render_overlay_bitmap(Gfx::Painter& painter)
|
||||
{
|
||||
painter.draw_text(Gfx::IntRect { {}, rect().size() }, DeprecatedString::formatted("{}", m_screen.index() + 1), font(), Gfx::TextAlignment::Center, Color::White);
|
||||
painter.draw_text(Gfx::IntRect { {}, rect().size() }, ByteString::formatted("{}", m_screen.index() + 1), font(), Gfx::TextAlignment::Center, Color::White);
|
||||
}
|
||||
|
||||
Gfx::IntRect ScreenNumberOverlay::calculate_content_rect_for_screen(Screen& screen)
|
||||
|
@ -319,9 +319,9 @@ void WindowGeometryOverlay::window_rect_changed()
|
|||
if (!window->size_increment().is_empty()) {
|
||||
int width_steps = (window->width() - window->base_size().width()) / window->size_increment().width();
|
||||
int height_steps = (window->height() - window->base_size().height()) / window->size_increment().height();
|
||||
m_label = DeprecatedString::formatted("{} ({}x{})", geometry_rect, width_steps, height_steps);
|
||||
m_label = ByteString::formatted("{} ({}x{})", geometry_rect, width_steps, height_steps);
|
||||
} else {
|
||||
m_label = geometry_rect.to_deprecated_string();
|
||||
m_label = geometry_rect.to_byte_string();
|
||||
}
|
||||
m_label_rect = Gfx::IntRect { 0, 0, static_cast<int>(ceilf(wm.font().width(m_label))) + 16, wm.font().pixel_size_rounded_up() + 10 };
|
||||
|
||||
|
@ -341,7 +341,7 @@ void WindowGeometryOverlay::render_overlay_bitmap(Gfx::Painter& painter)
|
|||
painter.draw_text(Gfx::IntRect { {}, rect().size() }, m_label, WindowManager::the().font(), Gfx::TextAlignment::Center, Color::White);
|
||||
}
|
||||
|
||||
DndOverlay::DndOverlay(DeprecatedString const& text, Gfx::Bitmap const* bitmap)
|
||||
DndOverlay::DndOverlay(ByteString const& text, Gfx::Bitmap const* bitmap)
|
||||
: m_bitmap(bitmap)
|
||||
, m_text(text)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue