-
Notifications
You must be signed in to change notification settings - Fork 9
fix: refresh UI model after updating log info #207
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
Conversation
1. Moved battery capacity warning from updateTitle to updateTips property 2. Now shows "Installation update failed" as the main title consistently 3. Battery warning appears only in the tips section when battery is below 60% 4. Maintains same functionality but with improved UI clarity Log: Fixed update failure page to show consistent failure title and moved battery warning to tips section Influence: 1. Test update failure scenario with battery below 60% - should show failure title with battery warning in tips 2. Test update failure scenario with battery above 60% - should show only failure title and standard tips 3. Verify the "Continue Update" button functionality remains unchanged 4. Check that the warning icon and log button still work correctly 5. Test UI layout to ensure tips section properly displays battery warning fix: 将电池电量警告从更新失败标题中分离 1. 将电池容量警告从 updateTitle 属性移动到 updateTips 属性 2. 现在始终显示"安装更新失败"作为主标题 3. 电池警告仅在电量低于60%时显示在提示部分 4. 保持相同功能但提高了UI清晰度 Log: 修复更新失败页面,显示一致的失败标题并将电池警告移至提示部分 Influence: 1. 测试电池电量低于60%时的更新失败场景 - 应显示失败标题并在提示中包含电 池警告 2. 测试电池电量高于60%时的更新失败场景 - 应仅显示失败标题和标准提示 3. 验证"继续更新"按钮功能保持不变 4. 检查警告图标和日志按钮是否仍正常工作 5. 测试UI布局以确保提示部分正确显示电池警告 pms: Bug-342839
1. Added m_model->refreshUpdateUiModel() call after updating item info in UpdateLogHelper 2. This ensures the UI model is refreshed when update log information is fetched successfully 3. Fixes potential UI display issues where the model might not reflect the latest log data Influence: 1. Verify that the update log information is properly displayed in the UI after updates 2. Test both successful update log retrieval scenarios 3. Check that UI updates correctly when update status changes 4. Ensure no regression in update log display functionality fix: 更新日志信息后刷新UI模型 1. 在UpdateLogHelper更新项目信息后添加m_model->refreshUpdateUiModel() 调用 2. 确保当更新日志信息成功获取时,UI模型能够及时刷新 3. 修复模型可能无法反映最新日志数据的潜在UI显示问题 Influence: 1. 验证更新后更新日志信息是否正确显示在UI中 2. 测试成功获取更新日志的场景 3. 检查更新状态变化时UI是否正确更新 4. 确保更新日志显示功能没有回归问题 pms: Bug-345827
deepin pr auto review我来对这个diff进行详细审查:
void UpdateWorker::handleUpdateLog() {
QMap<UpdateType, UpdateItemInfo> resultMap = UpdateLogHelper::ref().getUpdateLog();
if (!resultMap.isEmpty()) {
for (UpdateType type : resultMap.keys()) {
UpdateLogHelper::ref().updateItemInfo(resultMap.value(type));
}
m_model->refreshUpdateUiModel();
} else {
qCWarning(logDccUpdatePlugin) << "Get update log failed";
}
}
property string batteryWarning: qsTr("The battery capacity is lower than 60%. To get successful updates, please plug in.")
updateTips: {
if (!dccData.model().batterIsOK) {
return batteryWarning
}
return dccData.model().installFailedTips
}这些改动总体上是积极的,提高了代码的可维护性和用户体验。建议在实施上述改进后进行充分测试,确保UI更新的正确性和性能。 |
|
[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 |
|
integrate |
|
/integrate |
|
AutoIntegrationPr Bot |
fix: refresh UI model after updating log info
in UpdateLogHelper
fetched successfully
the latest log data
Influence:
UI after updates
fix: 更新日志信息后刷新UI模型
调用
Influence:
pms: Bug-345827