diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-10-17 08:37:30 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-10-17 08:37:30 +0800 |
| commit | 3c8d5c8f732239a8b50418be27464e30b9dddeae (patch) | |
| tree | 8ffb46c18e48c8463c1fb16fcacf216f296b8a1f /src/ui/mapper/style | |
| parent | 37943858b3b260589b5dc222bb5184d2846fb6dc (diff) | |
| download | cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.tar.gz cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.tar.bz2 cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.zip | |
Exception remove string.
Diffstat (limited to 'src/ui/mapper/style')
| -rw-r--r-- | src/ui/mapper/style/CheckedConditionMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/style/ClickStateConditionMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/style/FocusConditionMapper.cpp | 4 | ||||
| -rw-r--r-- | src/ui/mapper/style/HoverConditionMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/style/StyleRuleMapper.cpp | 2 | ||||
| -rw-r--r-- | src/ui/mapper/style/StyleRuleSetMapper.cpp | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/src/ui/mapper/style/CheckedConditionMapper.cpp b/src/ui/mapper/style/CheckedConditionMapper.cpp index 74e0a3c5..e33c1113 100644 --- a/src/ui/mapper/style/CheckedConditionMapper.cpp +++ b/src/ui/mapper/style/CheckedConditionMapper.cpp @@ -16,7 +16,7 @@ ClonablePtr<ui::style::CheckedCondition> CheckedConditionMapper::DoMapFromXml( } else if (value.CaseInsensitiveEqual(u"false")) { return ui::style::CheckedCondition::Create(false); } else { - throw Exception(u"Invalid value for CheckedCondition: " + value); + throw Exception("Invalid value for CheckedCondition: " + value.ToUtf8()); } } } // namespace cru::ui::mapper::style diff --git a/src/ui/mapper/style/ClickStateConditionMapper.cpp b/src/ui/mapper/style/ClickStateConditionMapper.cpp index d6b403c9..ca1f09c6 100644 --- a/src/ui/mapper/style/ClickStateConditionMapper.cpp +++ b/src/ui/mapper/style/ClickStateConditionMapper.cpp @@ -24,7 +24,7 @@ ClickStateConditionMapper::DoMapFromXml(xml::XmlElementNode *node) { } else if (value_attr->CaseInsensitiveEqual(u"pressinactive")) { state = helper::ClickState::PressInactive; } else { - throw Exception(u"Unknown click state: " + *value_attr); + throw Exception("Unknown click state: " + value_attr->ToUtf8()); } } diff --git a/src/ui/mapper/style/FocusConditionMapper.cpp b/src/ui/mapper/style/FocusConditionMapper.cpp index dfefb921..9aa1d6ce 100644 --- a/src/ui/mapper/style/FocusConditionMapper.cpp +++ b/src/ui/mapper/style/FocusConditionMapper.cpp @@ -1,5 +1,5 @@ -#include "cru/base/ClonablePtr.h" #include "cru/ui/mapper/style/FocusConditionMapper.h" +#include "cru/base/ClonablePtr.h" #include "cru/ui/style/Condition.h" #include "cru/xml/XmlNode.h" @@ -16,7 +16,7 @@ ClonablePtr<ui::style::FocusCondition> FocusConditionMapper::DoMapFromXml( } else if (value.CaseInsensitiveEqual(u"false")) { return ui::style::FocusCondition::Create(false); } else { - throw Exception(u"Invalid value for FocusCondition: " + value); + throw Exception("Invalid value for FocusCondition: " + value.ToUtf8()); } } } // namespace cru::ui::mapper::style diff --git a/src/ui/mapper/style/HoverConditionMapper.cpp b/src/ui/mapper/style/HoverConditionMapper.cpp index 0110edd9..27565192 100644 --- a/src/ui/mapper/style/HoverConditionMapper.cpp +++ b/src/ui/mapper/style/HoverConditionMapper.cpp @@ -17,7 +17,7 @@ ClonablePtr<HoverCondition> HoverConditionMapper::DoMapFromXml( } else if (value.CaseInsensitiveEqual(u"false")) { return ui::style::HoverCondition::Create(false); } else { - throw Exception(u"Invalid value for HoverCondition: " + value); + throw Exception("Invalid value for HoverCondition: " + value.ToUtf8()); } } } // namespace cru::ui::mapper::style diff --git a/src/ui/mapper/style/StyleRuleMapper.cpp b/src/ui/mapper/style/StyleRuleMapper.cpp index 2eb5b0a2..f80d27db 100644 --- a/src/ui/mapper/style/StyleRuleMapper.cpp +++ b/src/ui/mapper/style/StyleRuleMapper.cpp @@ -49,7 +49,7 @@ ClonablePtr<ui::style::StyleRule> StyleRuleMapper::DoMapFromXml( } if (!resolved) { - throw Exception(u"Unknown element in StyleRule: " + c->GetTag()); + throw Exception("Unknown element in StyleRule: " + c->GetTag().ToUtf8()); } } } diff --git a/src/ui/mapper/style/StyleRuleSetMapper.cpp b/src/ui/mapper/style/StyleRuleSetMapper.cpp index d014edc7..1067f8f8 100644 --- a/src/ui/mapper/style/StyleRuleSetMapper.cpp +++ b/src/ui/mapper/style/StyleRuleSetMapper.cpp @@ -25,7 +25,7 @@ std::shared_ptr<ui::style::StyleRuleSet> StyleRuleSetMapper::DoMapFromXml( auto style_rule = style_rule_mapper->MapFromXml(c); result->AddStyleRule(*style_rule); } else { - throw Exception(u"StyleRuleSet can only contain StyleRule."); + throw Exception("StyleRuleSet can only contain StyleRule."); } } } |
