From 6e19ab2bbce0b113b628e6f8e9b5c0640053933e Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 4 Dec 2022 18:02:33 +0000 Subject: 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 :^) --- Userland/Libraries/LibEDID/DMT.cpp | 8 ++++---- Userland/Libraries/LibEDID/DMT.h | 2 +- Userland/Libraries/LibEDID/EDID.cpp | 14 +++++++------- Userland/Libraries/LibEDID/EDID.h | 12 ++++++------ 4 files changed, 18 insertions(+), 18 deletions(-) (limited to 'Userland/Libraries/LibEDID') diff --git a/Userland/Libraries/LibEDID/DMT.cpp b/Userland/Libraries/LibEDID/DMT.cpp index 99d10945ef..6edc39f2e8 100644 --- a/Userland/Libraries/LibEDID/DMT.cpp +++ b/Userland/Libraries/LibEDID/DMT.cpp @@ -7,7 +7,7 @@ #include #ifndef KERNEL -# include +# include #endif namespace EDID { @@ -120,11 +120,11 @@ u32 DMT::MonitorTiming::refresh_rate_hz() const } #ifndef KERNEL -String DMT::MonitorTiming::name() const +DeprecatedString DMT::MonitorTiming::name() const { if (scan_type == ScanType::Interlaced) - return String::formatted("{} x {} @ {}Hz (Interlaced)", horizontal_pixels, vertical_lines, refresh_rate_hz()); - return String::formatted("{} x {} @ {}Hz", horizontal_pixels, vertical_lines, refresh_rate_hz()); + return DeprecatedString::formatted("{} x {} @ {}Hz (Interlaced)", horizontal_pixels, vertical_lines, refresh_rate_hz()); + return DeprecatedString::formatted("{} x {} @ {}Hz", horizontal_pixels, vertical_lines, refresh_rate_hz()); } #endif diff --git a/Userland/Libraries/LibEDID/DMT.h b/Userland/Libraries/LibEDID/DMT.h index 2181399dbf..a5c7de82b8 100644 --- a/Userland/Libraries/LibEDID/DMT.h +++ b/Userland/Libraries/LibEDID/DMT.h @@ -54,7 +54,7 @@ public: FixedPoint<16, u32> vertical_frequency_hz() const; u32 refresh_rate_hz() const; #ifndef KERNEL - String name() const; + DeprecatedString name() const; #endif }; diff --git a/Userland/Libraries/LibEDID/EDID.cpp b/Userland/Libraries/LibEDID/EDID.cpp index 1d8a61ceec..6038e60d0e 100644 --- a/Userland/Libraries/LibEDID/EDID.cpp +++ b/Userland/Libraries/LibEDID/EDID.cpp @@ -225,7 +225,7 @@ ErrorOr Parser::from_display_connector_device(int display_connector_fd) return from_bytes(move(edid_byte_buffer)); } -ErrorOr Parser::from_display_connector_device(String const& display_connector_device) +ErrorOr Parser::from_display_connector_device(DeprecatedString const& display_connector_device) { int display_connector_fd = open(display_connector_device.characters(), O_RDWR | O_CLOEXEC); if (display_connector_fd < 0) { @@ -312,7 +312,7 @@ ErrorOr Parser::parse() #ifdef KERNEL m_version = TRY(Kernel::KString::formatted("1.{}", (int)m_revision)); #else - m_version = String::formatted("1.{}", (int)m_revision); + m_version = DeprecatedString::formatted("1.{}", (int)m_revision); #endif u8 checksum = 0x0; @@ -417,7 +417,7 @@ StringView Parser::legacy_manufacturer_id() const } #ifndef KERNEL -String Parser::manufacturer_name() const +DeprecatedString Parser::manufacturer_name() const { if (!m_legacy_manufacturer_id_valid) return "Unknown"; @@ -1001,9 +1001,9 @@ ErrorOr Parser::for_each_display_descriptor(Function #else -# include +# include #endif namespace EDID { @@ -86,12 +86,12 @@ public: #ifndef KERNEL static ErrorOr from_display_connector_device(int); - static ErrorOr from_display_connector_device(String const&); + static ErrorOr from_display_connector_device(DeprecatedString const&); #endif StringView legacy_manufacturer_id() const; #ifndef KERNEL - String manufacturer_name() const; + DeprecatedString manufacturer_name() const; #endif u16 product_code() const; @@ -366,8 +366,8 @@ public: Optional detailed_timing(size_t) const; #ifndef KERNEL - String display_product_name() const; - String display_product_serial_number() const; + DeprecatedString display_product_name() const; + DeprecatedString display_product_serial_number() const; #endif ErrorOr for_each_short_video_descriptor(Function) const; @@ -454,7 +454,7 @@ private: #ifdef KERNEL OwnPtr m_version; #else - String m_version; + DeprecatedString m_version; #endif char m_legacy_manufacturer_id[4] {}; bool m_legacy_manufacturer_id_valid { false }; -- cgit v1.2.3