!39192 【基础能力】ArkUI C-API 拖拽安全警告修改

Merge pull request !39192 from Zhang Jinyu/dragWarnning
This commit is contained in:
openharmony_ci 2024-07-30 08:13:58 +00:00 committed by Gitee
commit 30f087d9e4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 7 additions and 7 deletions

View File

@ -171,7 +171,7 @@ void WindowSceneLayoutManager::FillWindowSceneInfo(const RefPtr<FrameNode>& node
uiParam.scaleY_ = matrix.Get(Rosen::Drawing::Matrix::SCALE_Y);
uiParam.pivotX_ = globalGeometry->GetPivotX();
uiParam.pivotY_ = globalGeometry->GetPivotY();
uiParam.zOrder_ = res.zOrderCnt_;
uiParam.zOrder_ = static_cast<uint32_t>(res.zOrderCnt_);
auto windowId = GetWindowId(node);
uiParam.sessionName_ = GetWindowName(node);
if (isAncestorRecent) {

View File

@ -59,7 +59,7 @@ namespace OHOS::Ace::NG {
namespace NodeModifier {
int64_t CalculateModifierKeyState(const std::vector<OHOS::Ace::KeyCode>& status)
{
int64_t modifierKeysState = 0;
uint64_t modifierKeysState = 0;
// check ctrl
if ((std::find(status.begin(), status.end(), OHOS::Ace::KeyCode::KEY_CTRL_LEFT) != std::end(status)) ||
(std::find(status.begin(), status.end(), OHOS::Ace::KeyCode::KEY_CTRL_RIGHT) != std::end(status))) {
@ -80,7 +80,7 @@ int64_t CalculateModifierKeyState(const std::vector<OHOS::Ace::KeyCode>& status)
modifierKeysState |= ARKUI_MODIFIER_KEY_FN;
}
return modifierKeysState;
return static_cast<int64_t>(modifierKeysState);
}
void SetDragEventProperty(const RefPtr<OHOS::Ace::DragEvent>& info, ArkUINodeEvent& event)
@ -102,14 +102,14 @@ void SetDragEventProperty(const RefPtr<OHOS::Ace::DragEvent>& info, ArkUINodeEve
event.dragEvent.velocity = info->GetVelocity().GetVelocityValue();
event.dragEvent.modifierKeyState = NodeModifier::CalculateModifierKeyState(info->GetPressedKeyCodes());
auto summary = info->GetSummary();
event.dragEvent.dataTypesCount = summary.size();
event.dragEvent.dataTypesCount = static_cast<int32_t>(summary.size());
int32_t index = 0;
int32_t maxLength = 0;
std::vector<const char*> strList;
std::vector<std::string> keepStr(summary.size());
for (auto it = summary.begin(); it != summary.end(); it++) {
int32_t keyLength = it->first.length();
int32_t keyLength = static_cast<int32_t>(it->first.length());
maxLength = std::max(maxLength, keyLength);
keepStr[index] = it->first;
strList.push_back(keepStr[index].c_str());
@ -258,14 +258,14 @@ void SetOnDragEnd(ArkUINodeHandle node, void* extraParam)
event.extraParam = reinterpret_cast<intptr_t>(extraParam);
event.dragEvent.subKind = ON_DRAG_END;
auto summary = info->GetSummary();
event.dragEvent.dataTypesCount = summary.size();
event.dragEvent.dataTypesCount = static_cast<int32_t>(summary.size());
int32_t index = 0;
int32_t maxLength = 0;
std::vector<const char*> strList;
std::vector<std::string> keepStr(summary.size());
for (auto it = summary.begin(); it != summary.end(); it++) {
int32_t keyLength = it->first.length();
int32_t keyLength = static_cast<int32_t>(it->first.length());
maxLength = std::max(maxLength, keyLength);
keepStr[index] = it->first;
strList.push_back(keepStr[index].c_str());