diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 12:06:14 +0800 |
commit | 32aa6f116acc6e3e20a1ec76cef45b29f7005ad7 (patch) | |
tree | 892b71060a88b58d9293d78033000b05818783df /src/ThemeBuilder/components/properties/TextPropertyEditor.h | |
parent | faf77949e19dc0d01f75bf8abb783eda70328048 (diff) | |
download | cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.gz cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.tar.bz2 cru-32aa6f116acc6e3e20a1ec76cef45b29f7005ad7.zip |
Remove String stage 1.
Diffstat (limited to 'src/ThemeBuilder/components/properties/TextPropertyEditor.h')
-rw-r--r-- | src/ThemeBuilder/components/properties/TextPropertyEditor.h | 14 |
1 files changed, 7 insertions, 7 deletions
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_; |