mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-12-01 03:02:51 +00:00
!37008 【safeWarning】TextPicker与Select安全告警修改
Merge pull request !37008 from yyuanche/warning
This commit is contained in:
commit
e5ae5409ca
@ -627,7 +627,7 @@ void SelectPattern::SetOptionBgColor(const Color& color)
|
||||
{
|
||||
optionBgColor_ = color;
|
||||
for (size_t i = 0; i < options_.size(); ++i) {
|
||||
if (i == selected_ && selectedBgColor_.has_value()) {
|
||||
if (static_cast<int32_t>(i) == selected_ && selectedBgColor_.has_value()) {
|
||||
continue;
|
||||
}
|
||||
auto pattern = options_[i]->GetPattern<OptionPattern>();
|
||||
@ -640,7 +640,7 @@ void SelectPattern::SetOptionFontSize(const Dimension& value)
|
||||
{
|
||||
optionFont_.FontSize = value;
|
||||
for (size_t i = 0; i < options_.size(); ++i) {
|
||||
if (i == selected_ && selectedFont_.FontSize.has_value()) {
|
||||
if (static_cast<int32_t>(i) == selected_ && selectedFont_.FontSize.has_value()) {
|
||||
continue;
|
||||
}
|
||||
auto pattern = options_[i]->GetPattern<OptionPattern>();
|
||||
@ -653,7 +653,7 @@ void SelectPattern::SetOptionItalicFontStyle(const Ace::FontStyle& value)
|
||||
{
|
||||
optionFont_.FontStyle = value;
|
||||
for (size_t i = 0; i < options_.size(); ++i) {
|
||||
if (i == selected_ && selectedFont_.FontStyle.has_value()) {
|
||||
if (static_cast<int32_t>(i) == selected_ && selectedFont_.FontStyle.has_value()) {
|
||||
continue;
|
||||
}
|
||||
auto pattern = options_[i]->GetPattern<OptionPattern>();
|
||||
@ -666,7 +666,7 @@ void SelectPattern::SetOptionFontWeight(const FontWeight& value)
|
||||
{
|
||||
optionFont_.FontWeight = value;
|
||||
for (size_t i = 0; i < options_.size(); ++i) {
|
||||
if (i == selected_ && selectedFont_.FontWeight.has_value()) {
|
||||
if (static_cast<int32_t>(i) == selected_ && selectedFont_.FontWeight.has_value()) {
|
||||
continue;
|
||||
}
|
||||
auto pattern = options_[i]->GetPattern<OptionPattern>();
|
||||
@ -679,7 +679,7 @@ void SelectPattern::SetOptionFontFamily(const std::vector<std::string>& value)
|
||||
{
|
||||
optionFont_.FontFamily = value;
|
||||
for (size_t i = 0; i < options_.size(); ++i) {
|
||||
if (i == selected_ && selectedFont_.FontFamily.has_value()) {
|
||||
if (static_cast<int32_t>(i) == selected_ && selectedFont_.FontFamily.has_value()) {
|
||||
continue;
|
||||
}
|
||||
auto pattern = options_[i]->GetPattern<OptionPattern>();
|
||||
@ -692,7 +692,7 @@ void SelectPattern::SetOptionFontColor(const Color& color)
|
||||
{
|
||||
optionFont_.FontColor = color;
|
||||
for (size_t i = 0; i < options_.size(); ++i) {
|
||||
if (i == selected_ && selectedFont_.FontColor.has_value()) {
|
||||
if (static_cast<int32_t>(i) == selected_ && selectedFont_.FontColor.has_value()) {
|
||||
continue;
|
||||
}
|
||||
auto pattern = options_[i]->GetPattern<OptionPattern>();
|
||||
|
@ -89,7 +89,7 @@ void GetTextPickerSelectedIndex(ArkUINodeHandle node, ArkUI_Uint32* values, ArkU
|
||||
values[0] = selectedValue;
|
||||
} else {
|
||||
auto selectedValue = TextPickerModelNG::getTextPickerSelecteds(frameNode);
|
||||
if (size != selectedValue.size()) {
|
||||
if (static_cast<ArkUI_Uint32>(size) != selectedValue.size()) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < size; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user