mirror of
https://github.com/RGBCube/serenity
synced 2025-07-08 14:57: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
|
@ -21,7 +21,7 @@
|
|||
|
||||
namespace HackStudio {
|
||||
|
||||
GitWidget::GitWidget(String const& repo_root)
|
||||
GitWidget::GitWidget(DeprecatedString const& repo_root)
|
||||
: m_repo_root(repo_root)
|
||||
{
|
||||
set_layout<GUI::HorizontalBoxLayout>();
|
||||
|
@ -117,7 +117,7 @@ void GitWidget::refresh()
|
|||
m_staged_files->set_model(GitFilesModel::create(m_git_repo->staged_files()));
|
||||
}
|
||||
|
||||
void GitWidget::stage_file(String const& file)
|
||||
void GitWidget::stage_file(DeprecatedString const& file)
|
||||
{
|
||||
dbgln("staging: {}", file);
|
||||
bool rc = m_git_repo->stage(file);
|
||||
|
@ -125,7 +125,7 @@ void GitWidget::stage_file(String const& file)
|
|||
refresh();
|
||||
}
|
||||
|
||||
void GitWidget::unstage_file(String const& file)
|
||||
void GitWidget::unstage_file(DeprecatedString const& file)
|
||||
{
|
||||
dbgln("unstaging: {}", file);
|
||||
bool rc = m_git_repo->unstage(file);
|
||||
|
@ -153,7 +153,7 @@ void GitWidget::set_view_diff_callback(ViewDiffCallback callback)
|
|||
m_view_diff_callback = move(callback);
|
||||
}
|
||||
|
||||
void GitWidget::show_diff(String const& file_path)
|
||||
void GitWidget::show_diff(DeprecatedString const& file_path)
|
||||
{
|
||||
if (!m_git_repo->is_tracked(file_path)) {
|
||||
auto file = Core::File::construct(file_path);
|
||||
|
@ -163,7 +163,7 @@ void GitWidget::show_diff(String const& file_path)
|
|||
}
|
||||
|
||||
auto content = file->read_all();
|
||||
String content_string((char*)content.data(), content.size());
|
||||
DeprecatedString content_string((char*)content.data(), content.size());
|
||||
m_view_diff_callback("", Diff::generate_only_additions(content_string));
|
||||
return;
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ void GitWidget::show_diff(String const& file_path)
|
|||
m_view_diff_callback(original_content.value(), diff.value());
|
||||
}
|
||||
|
||||
void GitWidget::change_repo(String const& repo_root)
|
||||
void GitWidget::change_repo(DeprecatedString const& repo_root)
|
||||
{
|
||||
m_repo_root = repo_root;
|
||||
m_git_repo = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue