fix: fix update page display issues#233
Merged
xionglinlin merged 1 commit intolinuxdeepin:masterfrom Feb 9, 2026
Merged
Conversation
|
TAG Bot New tag: 1.0.43 |
1. Fixed UI display logic in updateCheckUpdateUi() to handle UpdatesAvailable status 2. Removed redundant status setting and UI update calls in onCheckUpdateStatusChanged() 3. Ensured proper UI state transitions during update checking process Log: Fixed abnormal display issues on the update check page Influence: 1. Test update checking process from start to completion 2. Verify UI displays correctly when updates are available 3. Check that "Check Again" button appears properly in all states 4. Verify system status messages show correctly 5. Test transition between checking, available, and updated states fix: 修复更新页面显示异常问题 1. 修复 updateCheckUpdateUi() 中的 UI 显示逻辑,正确处理 UpdatesAvailable 状态 2. 移除 onCheckUpdateStatusChanged() 中冗余的状态设置和 UI 更新调用 3. 确保更新检查过程中的 UI 状态转换正确 Log: 修复更新检查页面显示异常问题 Influence: 1. 测试从开始到完成的更新检查流程 2. 验证有可用更新时 UI 显示正确 3. 检查"再次检查"按钮在所有状态下正确显示 4. 验证系统状态消息正确显示 5. 测试检查中、有可用更新、已更新状态之间的转换 PMS: BUG-350187
deepin pr auto review这段代码 diff 主要涉及系统更新模块中状态更新和 UI 刷新逻辑的修改。经过仔细审查,以下是从语法逻辑、代码质量、代码性能和代码安全四个方面的详细审查意见及改进建议: 1. 语法逻辑审查
2. 代码质量审查
3. 代码性能审查
4. 代码安全审查
总结与改进建议代码核心建议:
改进后的代码示例(针对 // src/dcc-update-plugin/operation/updatemodel.cpp
void UpdateModel::updateCheckUpdateUi()
{
// ... other cases ...
case Updated:
qCDebug(logDccUpdatePlugin) << "Setting UI for Updated status";
setCheckBtnText(tr("Check Again"));
setCheckUpdateErrTips(tr("Your system is up to date")); // 确实是最新
break;
case UpdatesAvailable:
qCDebug(logDccUpdatePlugin) << "Setting UI for UpdatesAvailable status";
setCheckBtnText(tr("Update Now")); // 或者是 "Install Updates",视具体需求而定
setCheckUpdateErrTips(tr("Updates are available")); // 提示有更新
break;
// ... other cases ...
}改进后的代码示例(针对 // src/dcc-update-plugin/operation/updatework.cpp
void UpdateWorker::onCheckUpdateStatusChanged(const QString& value)
{
// ...
} else if (value == "end") {
refreshLastTimeAndCheckCircle();
m_model->setCheckUpdateStatus(UpdatesStatus(m_model->lastStatus()));
// 安全性改进:删除后置空,防止野指针
if (m_checkUpdateJob) {
deleteJob(m_checkUpdateJob);
m_checkUpdateJob = nullptr;
}
m_doCheckUpdates = false;
// 确保UI刷新:如果 setCheckUpdateStatus 没触发信号,这里必须显式调用
// m_model->updateCheckUpdateUi();
}
} |
mhduiy
approved these changes
Feb 9, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, xionglinlin 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 |
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.
Log: Fixed abnormal display issues on the update check page
Influence:
fix: 修复更新页面显示异常问题
Log: 修复更新检查页面显示异常问题
Influence:
PMS: BUG-350187