1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:07:34 +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:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -5,7 +5,7 @@
*/
#include "HighlightPreviewWidget.h"
#include <AK/String.h>
#include <AK/DeprecatedString.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 = String::formatted("/res/cursor-themes/{}/{}", cursor_theme, "Config.ini");
auto theme_path = DeprecatedString::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::try_load_from_file(path);
@ -31,7 +31,7 @@ ErrorOr<void> HighlightPreviewWidget::reload_cursor()
return Gfx::Bitmap::try_load_from_file(default_path);
};
constexpr auto default_cursor_path = "/res/cursor-themes/Default/arrow.x2y2.png"sv;
auto cursor_path = String::formatted("/res/cursor-themes/{}/{}",
auto cursor_path = DeprecatedString::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);