summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibEDID
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-12-04 18:02:33 +0000
committerAndreas Kling <kling@serenityos.org>2022-12-06 08:54:33 +0100
commit6e19ab2bbce0b113b628e6f8e9b5c0640053933e (patch)
tree372d21b2f5dcff112f5d0089559c6af5798680d4 /Userland/Libraries/LibEDID
parentf74251606d74b504a1379ebb893fdb5529054ea5 (diff)
downloadserenity-6e19ab2bbce0b113b628e6f8e9b5c0640053933e.zip
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 :^)
Diffstat (limited to 'Userland/Libraries/LibEDID')
-rw-r--r--Userland/Libraries/LibEDID/DMT.cpp8
-rw-r--r--Userland/Libraries/LibEDID/DMT.h2
-rw-r--r--Userland/Libraries/LibEDID/EDID.cpp14
-rw-r--r--Userland/Libraries/LibEDID/EDID.h12
4 files changed, 18 insertions, 18 deletions
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 <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
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> 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;
diff --git a/Userland/Libraries/LibEDID/EDID.h b/Userland/Libraries/LibEDID/EDID.h
index 3d3282f296..eff8f26be0 100644
--- a/Userland/Libraries/LibEDID/EDID.h
+++ b/Userland/Libraries/LibEDID/EDID.h
@@ -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 };