!49210 代码规范

Merge pull request !49210 from bd/20241122
This commit is contained in:
openharmony_ci 2024-11-22 10:20:43 +00:00 committed by Gitee
commit 141c4baba3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 5 additions and 4 deletions

View File

@ -166,7 +166,7 @@ bool DragEventActuator::IsGlobalStatusSuitableForDragging()
return true;
}
bool DragEventActuator::IsSelfAndParentDragForbidden(const RefPtr<FrameNode>& frameNode)
bool DragEventActuator::IsSelfAndParentDragForbidden(const RefPtr<FrameNode>& frameNode) const
{
auto parent = frameNode;
while (parent) {

View File

@ -308,7 +308,7 @@ private:
// check the current node's status to decide if it can initiate one drag operation
bool IsCurrentNodeStatusSuitableForDragging(
const RefPtr<FrameNode>& frameNode, const TouchRestrict& touchRestrict);
bool IsSelfAndParentDragForbidden(const RefPtr<FrameNode>& frameNode);
bool IsSelfAndParentDragForbidden(const RefPtr<FrameNode>& frameNode) const;
std::optional<EffectOption> BrulStyleToEffection(const std::optional<BlurStyleOption>& blurStyleOp);
float RadiusToSigma(float radius);
void RecordMenuWrapperNodeForDrag(int32_t targetId);

View File

@ -212,7 +212,7 @@ public:
bool GetTouchable() const;
void SetTouchable(bool touchable);
void SetThumbnailCallback(std::function<void(Offset)>&& callback);
bool IsDragForbidden();
bool IsDragForbidden() const;
void SetDragForbiddenForcely(bool isDragForbidden);
bool GetTextDraggable() const;
void SetTextDraggable(bool draggable);

View File

@ -1087,7 +1087,7 @@ void GestureEventHub::SetDragForbiddenForcely(bool isDragForbiddenForWholeSubTre
isDragForbiddenForWholeSubTree_ = isDragForbiddenForWholeSubTree;
}
bool GestureEventHub::IsDragForbidden()
bool GestureEventHub::IsDragForbidden() const
{
return isDragForbiddenForWholeSubTree_;
}

View File

@ -453,6 +453,7 @@ std::optional<EffectOption> DragDropFuncWrapper::BrulStyleToEffection(
LOGW("cannot find theme of blurStyle, create blurStyle failed");
return std::nullopt;
}
CHECK_NULL_RETURN(blurStyleOp, std::nullopt);
ThemeColorMode colorMode = blurStyleOp->colorMode;
if (blurStyleOp->colorMode == ThemeColorMode::SYSTEM) {
colorMode = SystemProperties::GetColorMode() == ColorMode::DARK ? ThemeColorMode::DARK : ThemeColorMode::LIGHT;