Skip to content

fix: enhance update list display and version info#114

Merged
xionglinlin merged 1 commit into
linuxdeepin:masterfrom
xionglinlin:master
Jun 16, 2025
Merged

fix: enhance update list display and version info#114
xionglinlin merged 1 commit into
linuxdeepin:masterfrom
xionglinlin:master

Conversation

@xionglinlin

Copy link
Copy Markdown
Contributor
  1. Added version field to UpdateListModel for displaying package versions
  2. Modified SystemUpdateLog structure to include systemVersion and remove unused upgradeTime
  3. Updated UpdateWorker to sync update info with log helper
  4. Improved QML layout with better typography and version display
  5. Removed unused click signal and simplified release time display
  6. Added proper font sizing using DTK font manager

fix: 增强更新列表显示和版本信息

  1. 在 UpdateListModel 中添加版本字段用于显示软件包版本
  2. 修改 SystemUpdateLog 结构体,添加 systemVersion 并移除未使用的 upgradeTime
  3. 更新 UpdateWorker 以同步更新信息与日志助手
  4. 改进 QML 布局,优化排版并添加版本显示
  5. 移除未使用的点击信号并简化发布时间显示
  6. 使用 DTK 字体管理器添加适当的字体大小设置

pms: Bug-318147

font.pixelSize: D.DTK.fontManager.t8.pixelSize
color: rgba(0, 0, 0, 1)
visible: model.version.length !== 0
text: qsTr("Version:") + model.version

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Version:不应该当作翻译文本吧,是不是用Version

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个可以不用修改

Layout.alignment: Qt.AlignLeft
text: model.title
font.pixelSize: 14
font.pixelSize: D.DTK.fontManager.t6.pixelSize

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接用font: D.DTK.fontManager.t6

text: model.title
font.pixelSize: 14
font.pixelSize: D.DTK.fontManager.t6.pixelSize
color: rgba(0, 0, 0, 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是不死要适配暗亮色,

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

代码审查意见:

  1. updatelistmodel.cpp 文件中,新增了 Version 角色,但是没有对应的 data 函数实现。需要添加 data 函数来返回 data->currentVersion() 的值。

  2. updatelistmodel.h 文件中,新增了 Version 角色,但是在 roles 的定义中,Version 的键值没有按照之前的格式进行命名,建议保持一致。

  3. updateloghelper.h 文件中,SystemUpdateLog 结构体中的 upgradeTime 字段被重命名为 systemVersion,但是没有在代码中找到对应的修改。

  4. updatework.cpp 文件中,activateonCheckUpdateStatusChanged 函数中新增了对 m_model->getAllUpdateInfos() 的调用,但是没有对应的错误处理逻辑。

  5. UpdateControl.qml 文件中,Labelbold 属性被替换为 weight,但是没有考虑到不同平台和字体的兼容性问题。

  6. UpdateList.qml 文件中,Labelfont.pixelSize 属性被替换为 font,但是没有考虑到不同平台和字体的兼容性问题。

  7. UpdateList.qml 文件中,D.Labelvisible 属性被设置为 false,但是没有对应的注释说明为什么需要隐藏。

  8. UpdateList.qml 文件中,D.LabelonLinkActivated 信号被绑定,但是没有对应的错误处理逻辑。

  9. UpdateList.qml 文件中,RowLayout 的嵌套层级过多,建议简化布局结构。

  10. UpdateList.qml 文件中,Rectanglevisible 属性被设置为 false,但是没有对应的注释说明为什么需要隐藏。

  11. UpdateList.qml 文件中,DccItemBackgroundhighlightEnable 属性被注释掉,但是没有对应的注释说明为什么需要注释。

  12. UpdateList.qml 文件中,onClicked 信号被注释掉,但是没有对应的注释说明为什么需要注释。

  13. UpdateList.qml 文件中,onClicked 信号被注释掉,但是没有对应的注释说明为什么需要注释。

  14. update_ar.tsupdate_az.tsupdate_bo.tsupdate_ca.tsupdate_de_DE.tsupdate_en.tsupdate_en_US.tsupdate_es.tsupdate_et.tsupdate_fi.tsupdate_fr.tsupdate_gl_ES.tsupdate_hu.tsupdate_it.tsupdate_ja.tsupdate_kk.tsupdate_ko.tsupdate_lt.tsupdate_nb_NO.tsupdate_ne.tsupdate_nl.tsupdate_pl.tsupdate_pt_BR.tsupdate_ru.tsupdate_sq.tsupdate_tr.tsupdate_uk.tsupdate_vi.tsupdate_zh_CN.tsupdate_zh_HK.tsupdate_zh_TW.ts 文件中,Version 字符串的翻译被标记为 type="unfinished",需要完成翻译。

以上是代码审查的意见,希望能够对您有所帮助。

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, xionglinlin

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

Details 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

1. Added version field to UpdateListModel for displaying package
versions
2. Modified SystemUpdateLog structure to include systemVersion and
remove unused upgradeTime
3. Updated UpdateWorker to sync update info with log helper
4. Improved QML layout with better typography and version display
5. Removed unused click signal and simplified release time display
6. Added proper font sizing using DTK font manager

fix: 增强更新列表显示和版本信息

1. 在 UpdateListModel 中添加版本字段用于显示软件包版本
2. 修改 SystemUpdateLog 结构体,添加 systemVersion 并移除未使用的
upgradeTime
3. 更新 UpdateWorker 以同步更新信息与日志助手
4. 改进 QML 布局,优化排版并添加版本显示
5. 移除未使用的点击信号并简化发布时间显示
6. 使用 DTK 字体管理器添加适当的字体大小设置

pms: Bug-318147
@deepin-ci-robot

Copy link
Copy Markdown

@xionglinlin: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
deepin-auto-translation e5e8eaf link true /test deepin-auto-translation

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@xionglinlin xionglinlin merged commit 9cb2c59 into linuxdeepin:master Jun 16, 2025
5 of 7 checks passed
@Zeno-sole

Copy link
Copy Markdown

/integrate

@github-actions

Copy link
Copy Markdown

AutoIntegrationPr Bot
auto integrate with pr url: deepin-community/Repository-Integration#2920
PrNumber: 2920
PrBranch: auto-integration-15674858192

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