mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17:35 +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
|
@ -127,7 +127,7 @@ MainWidget::MainWidget()
|
|||
m_editor->insert_at_cursor_or_replace_selection(substitute);
|
||||
} else {
|
||||
GUI::MessageBox::show(window(),
|
||||
String::formatted("Not found: \"{}\"", needle),
|
||||
DeprecatedString::formatted("Not found: \"{}\"", needle),
|
||||
"Not found"sv,
|
||||
GUI::MessageBox::Type::Information);
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ MainWidget::MainWidget()
|
|||
}
|
||||
} else {
|
||||
GUI::MessageBox::show(window(),
|
||||
String::formatted("Not found: \"{}\"", needle),
|
||||
DeprecatedString::formatted("Not found: \"{}\"", needle),
|
||||
"Not found"sv,
|
||||
GUI::MessageBox::Type::Information);
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ WebView::OutOfProcessWebView& MainWidget::ensure_web_view()
|
|||
if (!Desktop::Launcher::open(url)) {
|
||||
GUI::MessageBox::show(
|
||||
window(),
|
||||
String::formatted("The link to '{}' could not be opened.", url),
|
||||
DeprecatedString::formatted("The link to '{}' could not be opened.", url),
|
||||
"Failed to open link"sv,
|
||||
GUI::MessageBox::Type::Error);
|
||||
}
|
||||
|
@ -722,7 +722,7 @@ bool MainWidget::read_file(Core::File& file)
|
|||
return true;
|
||||
}
|
||||
|
||||
void MainWidget::open_nonexistent_file(String const& path)
|
||||
void MainWidget::open_nonexistent_file(DeprecatedString const& path)
|
||||
{
|
||||
m_editor->set_text({});
|
||||
set_path(path);
|
||||
|
@ -847,11 +847,11 @@ void MainWidget::update_statusbar()
|
|||
|
||||
StringBuilder builder;
|
||||
if (m_editor->has_selection()) {
|
||||
String selected_text = m_editor->selected_text();
|
||||
DeprecatedString selected_text = m_editor->selected_text();
|
||||
auto word_count = m_editor->number_of_selected_words();
|
||||
builder.appendff("{} {} ({} {}) selected", selected_text.length(), selected_text.length() == 1 ? "character" : "characters", word_count, word_count != 1 ? "words" : "word");
|
||||
} else {
|
||||
String text = m_editor->text();
|
||||
DeprecatedString text = m_editor->text();
|
||||
auto word_count = m_editor->number_of_words();
|
||||
builder.appendff("{} {} ({} {})", text.length(), text.length() == 1 ? "character" : "characters", word_count, word_count != 1 ? "words" : "word");
|
||||
}
|
||||
|
@ -861,7 +861,7 @@ void MainWidget::update_statusbar()
|
|||
auto language = m_editor->syntax_highlighter()->language();
|
||||
m_statusbar->set_text(1, m_editor->syntax_highlighter()->language_string(language));
|
||||
}
|
||||
m_statusbar->set_text(2, String::formatted("Ln {}, Col {}", m_editor->cursor().line() + 1, m_editor->cursor().column()));
|
||||
m_statusbar->set_text(2, DeprecatedString::formatted("Ln {}, Col {}", m_editor->cursor().line() + 1, m_editor->cursor().column()));
|
||||
}
|
||||
|
||||
void MainWidget::find_text(GUI::TextEditor::SearchDirection direction, ShowMessageIfNoResults show_message)
|
||||
|
@ -878,7 +878,7 @@ void MainWidget::find_text(GUI::TextEditor::SearchDirection direction, ShowMessa
|
|||
|
||||
if (!result.is_valid() && show_message == ShowMessageIfNoResults::Yes) {
|
||||
GUI::MessageBox::show(window(),
|
||||
String::formatted("Not found: \"{}\"", needle),
|
||||
DeprecatedString::formatted("Not found: \"{}\"", needle),
|
||||
"Not found"sv,
|
||||
GUI::MessageBox::Type::Information);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue