Skip to content

Conversation

@FeiWang1119
Copy link

adapt to Treeland environment

Log:

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: FeiWang1119

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


bool isTreeLand()
{
return qEnvironmentVariable("DDE_CURRENT_COMPOSITOR") == "TreeLand";
Copy link
Contributor

Choose a reason for hiding this comment

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

这个也可以放到 DGuiApplicationHelperattribute 本来dtkgui中就有一堆判断都可以换成这个属性

@FeiWang1119 FeiWang1119 force-pushed the treeland branch 2 times, most recently from 1d37a6e to dc39cc9 Compare October 12, 2024 08:53
adapt to Treeland environment

Log:
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 依赖项更新

    • debian/control文件中,libdtkgui-dev的版本从libdtkgui-dev更新到了libdtkgui-dev (>= 5.6.35)。请确认是否有必要更新到这个版本,并确保所有相关的依赖项和库都支持这个版本。
  2. 代码重复

    • appearance1thread.cppappearancemanager.cpp文件中,DGuiApplicationHelper::testAttribute(DGuiApplicationHelper::IsTreelandPlatform)和获取系统主题属性的代码块重复出现。建议将这部分代码提取到一个单独的函数中,以减少代码重复和提高可维护性。
  3. 命名规范

    • Appearance1ThreadAppearanceManager类中,set方法命名应该遵循Qt的命名约定,即使用set前缀。例如,setIconTheme应该改为setIconTheme
  4. 错误处理

    • AppearanceManager类中,当设置字体时,如果字体无效,应该抛出异常或者返回一个错误码,而不是仅仅打印警告信息。这有助于调用者更好地处理错误情况。
  5. 线程安全

    • Appearance1ThreadAppearanceManager类中,访问和修改property对象时,应该使用互斥锁(QMutex)来确保线程安全。当前代码中缺少对property的访问进行同步保护。
  6. 代码注释

    • Appearance1ThreadAppearanceManager类中,添加必要的注释来解释每个方法和函数的作用,特别是对于复杂的逻辑和条件判断。
  7. 平台特定代码

    • Appearance1ThreadAppearanceManager类中,对DGuiApplicationHelper::testAttribute(DGuiApplicationHelper::IsTreelandPlatform)的判断,应该添加注释来解释为什么需要这个判断,以及这个平台特定的逻辑是如何工作的。
  8. 代码风格

    • 确保代码遵循项目的编码风格指南,包括缩进、空格和换行等。例如,if语句后面的条件判断应该有一个空格。
  9. 性能考虑

    • Appearance1ThreadAppearanceManager类中,如果DGuiApplicationHelper::testAttribute(DGuiApplicationHelper::IsTreelandPlatform)的判断非常频繁,可能会影响性能。考虑是否有必要缓存这个结果,或者是否有更高效的方式来处理平台特定的逻辑。
  10. 安全性

    • 确保代码中没有安全漏洞,例如SQL注入、跨站脚本(XSS)等。对于用户输入的处理,应该进行适当的验证和清理。

以上是针对提供的代码片段的审查意见,具体的改进措施需要根据项目的整体需求和上下文来决定。

@deepin-bot
Copy link

deepin-bot bot commented Oct 29, 2024

TAG Bot

New tag: 1.1.36
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #146

@deepin-bot
Copy link

deepin-bot bot commented Nov 22, 2024

TAG Bot

New tag: 1.1.38
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #153

@deepin-bot
Copy link

deepin-bot bot commented Nov 29, 2024

TAG Bot

New tag: 1.1.39
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #157

@deepin-bot
Copy link

deepin-bot bot commented Dec 6, 2024

TAG Bot

New tag: 1.1.40
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #160

@deepin-bot
Copy link

deepin-bot bot commented Dec 9, 2024

TAG Bot

New tag: 1.1.41
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #162

@18202781743
Copy link
Contributor

这个pr是不是可以关闭了,dtkgui里是不是已经做了treeland的适配了,

@18202781743 18202781743 removed their request for review December 10, 2024 01:13
@deepin-bot
Copy link

deepin-bot bot commented Dec 13, 2024

TAG Bot

New tag: 1.1.42
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #168

@deepin-bot
Copy link

deepin-bot bot commented Dec 24, 2024

TAG Bot

New tag: 1.1.43
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #174

@deepin-bot
Copy link

deepin-bot bot commented Jan 2, 2025

TAG Bot

New tag: 1.1.44
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #175

@18202781743
Copy link
Contributor

这个pr是不是可以关闭了,dtkgui里是不是已经做了treeland的适配了,

@18202781743 18202781743 closed this Jan 2, 2025
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