mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 04:57:45 +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:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -7,7 +7,7 @@
|
|||
#include <LibEDID/DMT.h>
|
||||
|
||||
#ifndef KERNEL
|
||||
# include <AK/String.h>
|
||||
# include <AK/DeprecatedString.h>
|
||||
#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
|
||||
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ ErrorOr<Parser> Parser::from_display_connector_device(int display_connector_fd)
|
|||
return from_bytes(move(edid_byte_buffer));
|
||||
}
|
||||
|
||||
ErrorOr<Parser> Parser::from_display_connector_device(String const& display_connector_device)
|
||||
ErrorOr<Parser> 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<void> 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<IterationDecision> Parser::for_each_display_descriptor(Function<Iteratio
|
|||
}
|
||||
|
||||
#ifndef KERNEL
|
||||
String Parser::display_product_name() const
|
||||
DeprecatedString Parser::display_product_name() const
|
||||
{
|
||||
String product_name;
|
||||
DeprecatedString product_name;
|
||||
auto result = for_each_display_descriptor([&](u8 descriptor_tag, Definitions::DisplayDescriptor const& display_descriptor) {
|
||||
if (descriptor_tag != (u8)Definitions::DisplayDescriptorTag::DisplayProductName)
|
||||
return IterationDecision::Continue;
|
||||
|
@ -1024,9 +1024,9 @@ String Parser::display_product_name() const
|
|||
return product_name;
|
||||
}
|
||||
|
||||
String Parser::display_product_serial_number() const
|
||||
DeprecatedString Parser::display_product_serial_number() const
|
||||
{
|
||||
String product_name;
|
||||
DeprecatedString product_name;
|
||||
auto result = for_each_display_descriptor([&](u8 descriptor_tag, Definitions::DisplayDescriptor const& display_descriptor) {
|
||||
if (descriptor_tag != (u8)Definitions::DisplayDescriptorTag::DisplayProductSerialNumber)
|
||||
return IterationDecision::Continue;
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#ifdef KERNEL
|
||||
# include <Kernel/KString.h>
|
||||
#else
|
||||
# include <AK/String.h>
|
||||
# include <AK/DeprecatedString.h>
|
||||
#endif
|
||||
|
||||
namespace EDID {
|
||||
|
@ -86,12 +86,12 @@ public:
|
|||
|
||||
#ifndef KERNEL
|
||||
static ErrorOr<Parser> from_display_connector_device(int);
|
||||
static ErrorOr<Parser> from_display_connector_device(String const&);
|
||||
static ErrorOr<Parser> 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<DetailedTiming> 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<IterationDecision> for_each_short_video_descriptor(Function<IterationDecision(unsigned, bool, VIC::Details const&)>) const;
|
||||
|
@ -454,7 +454,7 @@ private:
|
|||
#ifdef KERNEL
|
||||
OwnPtr<Kernel::KString> m_version;
|
||||
#else
|
||||
String m_version;
|
||||
DeprecatedString m_version;
|
||||
#endif
|
||||
char m_legacy_manufacturer_id[4] {};
|
||||
bool m_legacy_manufacturer_id_valid { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue