From 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Fri, 17 Oct 2025 12:06:14 +0800 Subject: Remove String stage 1. --- .../components/properties/TextPropertyEditor.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ThemeBuilder/components/properties/TextPropertyEditor.h') diff --git a/src/ThemeBuilder/components/properties/TextPropertyEditor.h b/src/ThemeBuilder/components/properties/TextPropertyEditor.h index c4944228..040f776a 100644 --- a/src/ThemeBuilder/components/properties/TextPropertyEditor.h +++ b/src/ThemeBuilder/components/properties/TextPropertyEditor.h @@ -12,16 +12,16 @@ class TextPropertyEditor : public ui::components::Component { ui::controls::Control* GetRootControl() override { return &container_; } - String GetLabel() const { return label_.GetText(); } - void SetLabel(String label) { label_.SetText(std::move(label)); } + std::string GetLabel() const { return label_.GetText(); } + void SetLabel(std::string label) { label_.SetText(std::move(label)); } - String GetText() const { return editor_.GetText(); } - StringView GetTextView() const { return editor_.GetTextView(); } - void SetText(String text) { editor_.SetText(std::move(text)); } + std::string GetText() const { return editor_.GetText(); } + std::string_view GetTextView() const { return editor_.GetTextView(); } + void SetText(std::string text) { editor_.SetText(std::move(text)); } protected: - virtual bool Validate(StringView text, String* error_message); - virtual void OnTextChanged(StringView text); + virtual bool Validate(std::string_view text, std::string* error_message); + virtual void OnTextChanged(std::string_view text); private: ui::controls::FlexLayout container_; -- cgit v1.2.3