fix: reset partialFactor in C++ exit path#1072
Draft
deepin-wm wants to merge 1 commit into
Draft
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-wm The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideResets the Multitaskview partialFactor state on exit in C++ instead of QML, ensuring it is set to 0.0 only when needed and avoiding writes to a read-only Q_PROPERTY, while keeping signal emissions consistent with existing updatePartialFactor logic. Sequence diagram for Multitaskview exit partialFactor resetsequenceDiagram
actor User
participant MultitaskviewProxy
participant Multitaskview
participant QMLBindings
User->>MultitaskviewProxy: exitRequested
MultitaskviewProxy->>Multitaskview: exit(surface, immediately)
Multitaskview-->>QMLBindings: aboutToExit()
alt [m_partialFactor differs from 0.0]
Multitaskview-->>QMLBindings: partialFactorChanged()
else [m_partialFactor equals 0.0]
end
alt [immediately]
Multitaskview->>Multitaskview: setVisible(false)
else [not immediately]
Multitaskview->>Multitaskview: startExitAnimation()
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
b5cafa8 to
c8ae63c
Compare
1. Add qFuzzyCompare guard to reset m_partialFactor in exit() consistent with updatePartialFactor() style 2. Remove invalid QML assignment to read-only partialFactor property in MultitaskviewProxy.qml 3. Update copyright year in MultitaskviewProxy.qml to 2024-2026 as required by SPDX CI check Influence: 1. Test multitaskview exit resets partialFactor without QML errors 2. Verify gesture exit flow works correctly with factor reset fix: 在C++退出路径中重置partialFactor 1. 在exit()中添加qFuzzyCompare守卫重置m_partialFactor 与updatePartialFactor()风格保持一致 2. 删除MultitaskviewProxy.qml中对只读partialFactor 属性的无效赋值 3. 更新MultitaskviewProxy.qml版权年份为2024-2026 以满足SPDX CI检查要求 Influence: 1. 测试多任务视图退出时partialFactor正常重置且无QML报错 2. 验证手势退出流程中factor重置的正确性 PMS: BUG-346717
c8ae63c to
bd43e95
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix QML TypeError: Cannot assign to read-only property "partialFactor" in MultitaskviewProxy.qml.
Changes
exit(): AddqFuzzyCompareguard to resetm_partialFactorto 0.0, consistent withupdatePartialFactor()style. When the value differs from 0.0, emitpartialFactorChanged; otherwise just ensure exact 0.0 without redundant signal.partialFactor = 0to the read-only Q_PROPERTY. The reset is now handled in C++.Related
Summary by Sourcery
Ensure the multitask view resets its partial factor state on exit without violating QML read-only property constraints.
Bug Fixes: