mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +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
|
@ -10,13 +10,13 @@
|
|||
|
||||
namespace HackStudio {
|
||||
|
||||
Project::Project(String const& root_path)
|
||||
Project::Project(DeprecatedString const& root_path)
|
||||
: m_root_path(root_path)
|
||||
{
|
||||
m_model = GUI::FileSystemModel::create(root_path, GUI::FileSystemModel::Mode::FilesAndDirectories);
|
||||
}
|
||||
|
||||
OwnPtr<Project> Project::open_with_root_path(String const& root_path)
|
||||
OwnPtr<Project> Project::open_with_root_path(DeprecatedString const& root_path)
|
||||
{
|
||||
if (!Core::File::is_directory(root_path))
|
||||
return {};
|
||||
|
@ -45,18 +45,18 @@ void Project::for_each_text_file(Function<void(ProjectFile const&)> callback) co
|
|||
});
|
||||
}
|
||||
|
||||
NonnullRefPtr<ProjectFile> Project::create_file(String const& path) const
|
||||
NonnullRefPtr<ProjectFile> Project::create_file(DeprecatedString const& path) const
|
||||
{
|
||||
auto full_path = to_absolute_path(path);
|
||||
return ProjectFile::construct_with_name(full_path);
|
||||
}
|
||||
|
||||
String Project::to_absolute_path(String const& path) const
|
||||
DeprecatedString Project::to_absolute_path(DeprecatedString const& path) const
|
||||
{
|
||||
if (LexicalPath { path }.is_absolute()) {
|
||||
return path;
|
||||
}
|
||||
return LexicalPath { String::formatted("{}/{}", m_root_path, path) }.string();
|
||||
return LexicalPath { DeprecatedString::formatted("{}/{}", m_root_path, path) }.string();
|
||||
}
|
||||
|
||||
bool Project::project_is_serenity() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue