mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13: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:
parent
f74251606d
commit
6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions
|
@ -8,9 +8,9 @@
|
|||
#pragma once
|
||||
|
||||
#include "MailboxTreeModel.h"
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/NonnullRefPtrVector.h>
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/String.h>
|
||||
#include <LibIMAP/Objects.h>
|
||||
|
||||
class BaseNode : public RefCounted<BaseNode> {
|
||||
|
@ -22,7 +22,7 @@ class MailboxNode;
|
|||
|
||||
class AccountNode final : public BaseNode {
|
||||
public:
|
||||
static NonnullRefPtr<AccountNode> create(String name)
|
||||
static NonnullRefPtr<AccountNode> create(DeprecatedString name)
|
||||
{
|
||||
return adopt_ref(*new AccountNode(move(name)));
|
||||
}
|
||||
|
@ -35,21 +35,21 @@ public:
|
|||
}
|
||||
|
||||
NonnullRefPtrVector<MailboxNode> const& mailboxes() const { return m_mailboxes; }
|
||||
String const& name() const { return m_name; }
|
||||
DeprecatedString const& name() const { return m_name; }
|
||||
|
||||
private:
|
||||
explicit AccountNode(String name)
|
||||
explicit AccountNode(DeprecatedString name)
|
||||
: m_name(move(name))
|
||||
{
|
||||
}
|
||||
|
||||
String m_name;
|
||||
DeprecatedString m_name;
|
||||
NonnullRefPtrVector<MailboxNode> m_mailboxes;
|
||||
};
|
||||
|
||||
class MailboxNode final : public BaseNode {
|
||||
public:
|
||||
static NonnullRefPtr<MailboxNode> create(AccountNode const& associated_account, IMAP::ListItem const& mailbox, String display_name)
|
||||
static NonnullRefPtr<MailboxNode> create(AccountNode const& associated_account, IMAP::ListItem const& mailbox, DeprecatedString display_name)
|
||||
{
|
||||
return adopt_ref(*new MailboxNode(associated_account, mailbox, move(display_name)));
|
||||
}
|
||||
|
@ -57,8 +57,8 @@ public:
|
|||
virtual ~MailboxNode() override = default;
|
||||
|
||||
AccountNode const& associated_account() const { return m_associated_account; }
|
||||
String const& select_name() const { return m_mailbox.name; }
|
||||
String const& display_name() const { return m_display_name; }
|
||||
DeprecatedString const& select_name() const { return m_mailbox.name; }
|
||||
DeprecatedString const& display_name() const { return m_display_name; }
|
||||
IMAP::ListItem const& mailbox() const { return m_mailbox; }
|
||||
|
||||
bool has_parent() const { return m_parent; }
|
||||
|
@ -70,7 +70,7 @@ public:
|
|||
void add_child(NonnullRefPtr<MailboxNode> child) { m_children.append(child); }
|
||||
|
||||
private:
|
||||
MailboxNode(AccountNode const& associated_account, IMAP::ListItem const& mailbox, String display_name)
|
||||
MailboxNode(AccountNode const& associated_account, IMAP::ListItem const& mailbox, DeprecatedString display_name)
|
||||
: m_associated_account(associated_account)
|
||||
, m_mailbox(mailbox)
|
||||
, m_display_name(move(display_name))
|
||||
|
@ -79,7 +79,7 @@ private:
|
|||
|
||||
AccountNode const& m_associated_account;
|
||||
IMAP::ListItem m_mailbox;
|
||||
String m_display_name;
|
||||
DeprecatedString m_display_name;
|
||||
|
||||
NonnullRefPtrVector<MailboxNode> m_children;
|
||||
RefPtr<MailboxNode> m_parent;
|
||||
|
@ -94,7 +94,7 @@ public:
|
|||
return adopt_own(*new AccountHolder());
|
||||
}
|
||||
|
||||
void add_account_with_name_and_mailboxes(String, Vector<IMAP::ListItem> const&);
|
||||
void add_account_with_name_and_mailboxes(DeprecatedString, Vector<IMAP::ListItem> const&);
|
||||
|
||||
NonnullRefPtrVector<AccountNode> const& accounts() const { return m_accounts; }
|
||||
MailboxTreeModel& mailbox_tree_model() { return *m_mailbox_tree_model; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue