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

chore: notify settings and icon tweak #367

Merged
merged 3 commits into from
May 24, 2024
Merged

Conversation

kegechen
Copy link
Contributor

@kegechen kegechen commented May 16, 2024

chore: notify settings and icon tweak

  • get appid from AM first(pid ==> appid)
  • get appid from cached item info(.names)
  • if icon is empty get icon from settings
  • GenericName[lang] first then Name[lang]
  • alwayays update icon and name in initAllSettings
    linux.qq.com desktop 名是 qq.desktop 即 appID 是 qq , 但是通知时 AppName 是QQ

Issue: linuxdeepin/developer-center#8281
Issue: linuxdeepin/developer-center#6907

b4:
image

now:
image

@kegechen kegechen force-pushed the qq_QQ branch 2 times, most recently from c99fab2 to 07720b7 Compare May 23, 2024 03:35
- get appid from AM first(pid ==> appid)
- get appid from cached item info(.names)
- if icon is empty get icon from settings

linux.qq.com desktop 文件名是 qq.desktop 即 appID 是 qq , 但是通知时 AppName 是QQ

Issue: linuxdeepin/developer-center#8281
@kegechen
Copy link
Contributor Author

/integrate

Copy link

TAG Bot

TAG: 6.0.19
EXISTED: no
DISTRIBUTION: unstable

Copy link

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

kegechen added 2 commits May 23, 2024 14:50
- GenericName[lang] first then Name[lang]
- always update icon and name in initAllSettings

Issue: linuxdeepin/developer-center#6907
release 6.0.19

Log: bump version to 6.0.19
@kegechen
Copy link
Contributor Author

/integrate

@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • NotifySettings::NotifySettings构造函数中,使用了DCORE_USE_NAMESPACE宏,但未提供上下文说明其用途。
  • NotifySettings类新增了m_launcherItemInfoList成员变量,但未提供初始化代码或确保不会引起内存泄漏。
  • LauncherItemInfo结构体新增了names成员变量,但未更新相关的成员函数和条件编译指令。
  • NotifySettings::initAllSettings函数中,使用了std::find_if查找m_launcherItemInfoList中的元素,但没有考虑names member variable可能存在多个相同值的情况。
  • NotifySettings::getAppSetting函数中,使用了qdbus_cast来获取QMap类型的返回值,但没有检查转换结果是否成功。

是否建议立即修改:

代码审查建议立即修改的原因是,新增的代码没有充分的上下文和初始化,可能会导致运行时错误或者数据不一致。特别是m_launcherItemInfoList的初始化和namesmember variable的使用,需要确保它们在类的其他部分被正确处理。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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.

3 participants