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

fix: after setting the cursor theme, it will not update in real-time. #269

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

mhduiy
Copy link
Contributor

@mhduiy mhduiy commented Jan 7, 2025

Monitor the Gtk/CursorThemeName property and manually call changeCursor() to refresh the cursor when it changes

pms: BUG-296269

deepin-ci-robot added a commit to linuxdeepin/qt6platform-plugins that referenced this pull request Jan 7, 2025
Synchronize source files from linuxdeepin/qt5platform-plugins.

Source-pull-request: linuxdeepin/qt5platform-plugins#269
@mhduiy mhduiy requested a review from 18202781743 January 7, 2025 07:57
18202781743
18202781743 previously approved these changes Jan 7, 2025
Monitor the Gtk/CursorThemeName property and manually call changeCursor() to refresh the cursor when it changes

pms: BUG-296269
deepin-ci-robot added a commit to linuxdeepin/qt6platform-plugins that referenced this pull request Jan 7, 2025
Synchronize source files from linuxdeepin/qt5platform-plugins.

Source-pull-request: linuxdeepin/qt5platform-plugins#269
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • cursorThemePropertyChanged 函数中使用了 QMetaObject::invokeMethod,但没有提供具体的槽函数,可能会导致运行时错误。
  • cursorThemePropertyChanged 函数中的 Q_UNUSED 宏没有实际用途,因为 connectionnamepropertyhandle 参数在函数体内没有被使用。
  • cursorThemePropertyChanged 函数中的 for 循环遍历了所有窗口,可能会影响性能,特别是当窗口数量较多时。
  • cursorThemePropertyChanged 函数中的 overrideChangeCursor 调用没有错误处理机制,如果失败可能会导致未定义行为。

是否建议立即修改:

  • 应该提供具体的槽函数来处理 QMetaObject::invokeMethod 的调用。
  • 移除 Q_UNUSED 宏,因为它们没有实际用途。
  • 优化 for 循环,避免不必要的窗口遍历,或者考虑使用更高效的数据结构来存储窗口。
  • overrideChangeCursor 调用添加错误处理机制,确保在调用失败时能够正确处理。

@deepin-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@mhduiy mhduiy merged commit edef78c into linuxdeepin:master Jan 8, 2025
18 of 20 checks passed
mhduiy pushed a commit to linuxdeepin/qt6platform-plugins that referenced this pull request Jan 8, 2025
Synchronize source files from linuxdeepin/qt5platform-plugins.

Source-pull-request: linuxdeepin/qt5platform-plugins#269
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