mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 02:37:42 +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
|
@ -32,7 +32,7 @@ Menu* Menu::from_menu_id(int menu_id)
|
|||
return (*it).value;
|
||||
}
|
||||
|
||||
Menu::Menu(String name)
|
||||
Menu::Menu(DeprecatedString name)
|
||||
: m_name(move(name))
|
||||
{
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ void Menu::remove_all_actions()
|
|||
m_items.clear();
|
||||
}
|
||||
|
||||
ErrorOr<NonnullRefPtr<Menu>> Menu::try_add_submenu(String name)
|
||||
ErrorOr<NonnullRefPtr<Menu>> Menu::try_add_submenu(DeprecatedString name)
|
||||
{
|
||||
// NOTE: We grow the vector first, to get allocation failure handled immediately.
|
||||
TRY(m_items.try_ensure_capacity(m_items.size() + 1));
|
||||
|
@ -87,7 +87,7 @@ ErrorOr<NonnullRefPtr<Menu>> Menu::try_add_submenu(String name)
|
|||
return submenu;
|
||||
}
|
||||
|
||||
Menu& Menu::add_submenu(String name)
|
||||
Menu& Menu::add_submenu(DeprecatedString name)
|
||||
{
|
||||
auto menu = MUST(try_add_submenu(move(name)));
|
||||
return menu;
|
||||
|
@ -197,7 +197,7 @@ void Menu::realize_menu_item(MenuItem& item, int item_id)
|
|||
break;
|
||||
case MenuItem::Type::Action: {
|
||||
auto& action = *item.action();
|
||||
auto shortcut_text = action.shortcut().is_valid() ? action.shortcut().to_string() : String();
|
||||
auto shortcut_text = action.shortcut().is_valid() ? action.shortcut().to_string() : DeprecatedString();
|
||||
bool exclusive = action.group() && action.group()->is_exclusive() && action.is_checkable();
|
||||
bool is_default = (m_current_default_action.ptr() == &action);
|
||||
auto icon = action.icon() ? action.icon()->to_shareable_bitmap() : Gfx::ShareableBitmap();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue