1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 06:17: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

@ -6,7 +6,7 @@
#pragma once
#include <AK/String.h>
#include <AK/DeprecatedString.h>
#include <AK/Types.h>
#include <AK/Vector.h>
#include <LibCore/SecretString.h>
@ -40,8 +40,8 @@ public:
bool authenticate(SecretString const& password) const;
ErrorOr<void> login() const;
String username() const { return m_username; }
String password_hash() const { return m_password_hash; }
DeprecatedString username() const { return m_username; }
DeprecatedString password_hash() const { return m_password_hash; }
// Setters only affect in-memory copy of password.
// You must call sync to apply changes.
@ -60,9 +60,9 @@ public:
uid_t uid() const { return m_uid; }
gid_t gid() const { return m_gid; }
String const& gecos() const { return m_gecos; }
String const& home_directory() const { return m_home_directory; }
String const& shell() const { return m_shell; }
DeprecatedString const& gecos() const { return m_gecos; }
DeprecatedString const& home_directory() const { return m_home_directory; }
DeprecatedString const& shell() const { return m_shell; }
Vector<gid_t> const& extra_gids() const { return m_extra_gids; }
ErrorOr<void> sync();
@ -72,19 +72,19 @@ private:
Account(passwd const& pwd, spwd const& spwd, Vector<gid_t> extra_gids);
ErrorOr<String> generate_passwd_file() const;
ErrorOr<DeprecatedString> generate_passwd_file() const;
#ifndef AK_OS_BSD_GENERIC
ErrorOr<String> generate_shadow_file() const;
ErrorOr<DeprecatedString> generate_shadow_file() const;
#endif
String m_username;
DeprecatedString m_username;
String m_password_hash;
DeprecatedString m_password_hash;
uid_t m_uid { 0 };
gid_t m_gid { 0 };
String m_gecos;
String m_home_directory;
String m_shell;
DeprecatedString m_gecos;
DeprecatedString m_home_directory;
DeprecatedString m_shell;
Vector<gid_t> m_extra_gids;
};