1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 00:27:43 +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:
Linus Groh 2022-12-04 18:02:33 +00:00 committed by Andreas Kling
parent f74251606d
commit 6e19ab2bbc
2006 changed files with 11635 additions and 11636 deletions

View file

@ -7,10 +7,10 @@
#pragma once
#include <AK/ByteBuffer.h>
#include <AK/DeprecatedString.h>
#include <AK/LexicalPath.h>
#include <AK/RefCounted.h>
#include <AK/Result.h>
#include <AK/String.h>
#include <AK/Weakable.h>
#include <LibGUI/Icon.h>
@ -18,28 +18,28 @@ namespace HackStudio {
class ProjectTemplate : public RefCounted<ProjectTemplate> {
public:
static String templates_path() { return "/res/devel/templates"; }
static DeprecatedString templates_path() { return "/res/devel/templates"; }
static RefPtr<ProjectTemplate> load_from_manifest(String const& manifest_path);
static RefPtr<ProjectTemplate> load_from_manifest(DeprecatedString const& manifest_path);
explicit ProjectTemplate(String const& id, String const& name, String const& description, const GUI::Icon& icon, int priority);
explicit ProjectTemplate(DeprecatedString const& id, DeprecatedString const& name, DeprecatedString const& description, const GUI::Icon& icon, int priority);
Result<void, String> create_project(String const& name, String const& path);
Result<void, DeprecatedString> create_project(DeprecatedString const& name, DeprecatedString const& path);
String const& id() const { return m_id; }
String const& name() const { return m_name; }
String const& description() const { return m_description; }
DeprecatedString const& id() const { return m_id; }
DeprecatedString const& name() const { return m_name; }
DeprecatedString const& description() const { return m_description; }
const GUI::Icon& icon() const { return m_icon; }
const String content_path() const
const DeprecatedString content_path() const
{
return LexicalPath::canonicalized_path(String::formatted("{}/{}", templates_path(), m_id));
return LexicalPath::canonicalized_path(DeprecatedString::formatted("{}/{}", templates_path(), m_id));
}
int priority() const { return m_priority; }
private:
String m_id;
String m_name;
String m_description;
DeprecatedString m_id;
DeprecatedString m_name;
DeprecatedString m_description;
GUI::Icon m_icon;
int m_priority { 0 };
};