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

add desktop plugin definitions and improve plugin loading #2542

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

Johnson-zs
Copy link
Contributor

refactor: add desktop plugin definitions and improve plugin loading
refactor: improve cmake config for dfm6-base

- Added required dependencies in pkg-config file:
  * Added Qt6, DTK6 and DFM6 components to Requires field
- Enhanced CMake configuration:
  * Added CMakeFindDependencyMacro for downstream projects
  * Added proper dependency declarations in Config.cmake
  * Updated target installation to use modern CMake approach
  * Improved include directory handling with generator expressions
- Re-enabled video preview plugin build
- Fixed Qt6 compatibility issues:
  * Updated palette color role (Foreground -> WindowText)
  * Replaced deprecated QDesktopWidget with QScreen API

Log:
- Added desktop plugin definitions in dfm_plugin_defines.h:
  * Added Core::kDesktop for core desktop plugins
  * Added Edge::kDesktop for edge desktop plugins
  * Added desktopCorePlugins() and desktopAllPlugins() utility functions
- Improved plugin loading mechanism:
  * Replaced static lazy load list with dynamic filter function
  * Added plugin filter based on desktop core plugins list
  * Removed hardcoded plugin names from lazy loading list
- Updated package dependencies:
  * Removed qt5dxcb-plugin and dcc-wallpapersetting-plugin from Recommends

Log:
Copy link

github-actions bot commented Jan 8, 2025

  • 检测到debian目录文件有变更: debian/control

@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. dfm6-base.pc.in文件中,Requires字段中列出的依赖项应该按照依赖关系的顺序排列,以确保依赖项的安装顺序正确。例如,dfm6-io应该排在dfm6-mount之前,因为dfm6-mount可能依赖于dfm6-io

  2. dfm6-baseConfig.cmake.in文件中,find_dependency函数用于查找依赖项,但是没有检查这些依赖项是否真的找到了。建议添加检查逻辑,如果依赖项未找到,则给出错误提示并停止配置过程。

  3. debian/control文件中,Recommends字段中列出的软件包应该根据实际需求进行更新。例如,如果qt5dxcb-plugin不再需要,应该将其从Recommends字段中移除。

  4. dfm_plugin_defines.h文件中,TODO: auto register注释表明需要自动注册插件,但是没有提供具体的实现。建议添加自动注册插件的代码,或者提供实现自动注册的方案。

  5. videostatusbar.cppvideowidget.cpp文件中,QPalette的颜色设置应该使用QPalette::WindowText而不是QPalette::Foreground,以确保颜色设置正确。

  6. dfm-base.cmake文件中,target_link_librariestarget_include_directories命令的参数应该按照CMake的最佳实践进行格式化,以提高代码的可读性。

  7. main.cpp文件中,lazyLoadFilter函数中使用了DFMBASE_NAMESPACE::Plugins::Utils::desktopCorePlugins(),但是没有检查该函数的返回值是否为空。建议添加检查逻辑,以避免潜在的空指针异常。

  8. main.cpp文件中,DPF_NAMESPACE::LifeCycle::initialize函数的调用中,kLazyLoadPluginNames参数被移除,但是没有提供替代的懒加载插件列表。建议添加替代的懒加载插件列表,或者提供懒加载插件的实现。

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

Copy link

github-actions bot commented Jan 8, 2025

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "debian/control": [
        {
            "line": "Homepage: http://www.deepin.org",
            "line_number": 69,
            "rule": "S35",
            "reason": "Url link | 6fe814dfb7"
        }
    ]
}

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Johnson-zs, lzwind, max-lvs

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

@lzwind
Copy link
Contributor

lzwind commented Jan 9, 2025

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Jan 9, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit 921c64f into linuxdeepin:master Jan 9, 2025
17 of 20 checks passed
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