Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [debugger] Error in displaying QList member variables #1039

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

LiHua000
Copy link
Contributor

@LiHua000 LiHua000 commented Jan 6, 2025

When the variable is dynamic, it cannot be determined whether it has child members through attributes. Directly obtain it to observe whether it has child members’ is ‘When the variable is dynamic, it cannot be determined whether it has child members through properties. Directly access it to observe whether it has child members

Log: as title

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. qt.py文件中,删除了多余的空行,这是一个好的实践,可以保持代码的整洁。

  2. gdbdebugger.cpp文件中,parseChildVariable函数的参数类型从const gdbmi::Variable *更改为gdbmi::Variable *,这可能会影响其他调用该函数的地方。需要确认这一更改是否与函数的预期行为一致,并且是否在其他地方也做了相应的修改。

  3. parseChildVariable函数中,添加了对var->dynamic的检查,并在满足条件时递归调用parseChildVariable。这是一个合理的做法,可以确保动态变量被正确处理。

  4. parseChildVariable函数中,当var->value"{...}"时,将其设置为空字符串。这是一个合理的处理方式,可以避免不必要的显示。

  5. parseChildVariable函数中,当parentVariable->hasMorefalse时,更新了parentVariablechildRefrencehasMore属性。这是一个合理的做法,可以确保父变量的状态正确反映其子变量的状态。

  6. gdbmi.cpp文件中,Variable::parseMap函数中,hasMore属性的默认值从true更改为false。这是一个合理的做法,可以避免不必要的递归调用。

总体来说,代码的更改看起来是合理的,但是需要确保这些更改不会影响其他部分的代码逻辑。如果parseChildVariable函数的参数类型更改,需要检查所有调用该函数的地方,并确保它们也做了相应的修改。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Kakueeen, LiHua000
Once this PR has been reviewed and has the lgtm label, please assign eric2023 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-mozart deepin-mozart merged commit 542dc99 into linuxdeepin:master Jan 6, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants