Skip to content

Conversation

@deepin-ci-robot
Copy link
Contributor

Synchronize source files from linuxdeepin/qt5platform-plugins.

Source-pull-request: linuxdeepin/qt5platform-plugins#297

Synchronize source files from linuxdeepin/qt5platform-plugins.

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

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-ci-robot

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

@deepin-ci-robot
Copy link
Contributor Author

deepin pr auto review

代码审查意见:

  1. DDesktopInputSelectionControl::eventFilter函数中,对于QTouchEventQMouseEvent的处理,使用了条件编译来区分Qt 5和Qt 6的版本。这种做法是合理的,但是建议在代码中添加注释说明为什么需要这样做,以及不同版本之间的差异。

  2. DSelectedTextTooltip类中,对于QGuiApplication::fontChanged信号的处理,在Qt 6中使用了事件过滤器替代。这种做法是合理的,但是需要确保在Qt 6中,QGuiApplication::fontChanged信号仍然可用,并且事件过滤器能够正确地捕获到该事件。

  3. DXcbXSettingsPrivate类中,对于QVariant类型的处理,使用了条件编译来区分Qt 5和Qt 6的版本。这种做法是合理的,但是需要确保在Qt 6中,QVariant::typeId()QVariant::type()的行为是一致的。

  4. DFrameWindow::mouseMoveEvent函数中,对于鼠标位置的判断,使用了条件编译来区分Qt 5和Qt 6的版本。这种做法是合理的,但是需要确保在Qt 6中,QMouseEvent::x()QMouseEvent::position().x()的行为是一致的。

  5. DNoTitlebarWindowHelper::windowEvent函数中,对于鼠标位置的判断,使用了条件编译来区分Qt 5和Qt 6的版本。这种做法是合理的,但是需要确保在Qt 6中,QMouseEvent::globalPos()QMouseEvent::globalPosition().toPoint()的行为是一致的。

  6. DPlatformWindowHelper::eventFilter函数中,对于鼠标位置的判断,使用了条件编译来区分Qt 5和Qt 6的版本。这种做法是合理的,但是需要确保在Qt 6中,QMouseEvent::localPos()QMouseEvent::position()的行为是一致的。

  7. DHighDpi::init函数中,对于高DPI缩放的设置,在Qt 6中不需要设置Qt::AA_EnableHighDpiScaling属性。这种做法是合理的,但是需要确保在Qt 6中,高DPI缩放总是启用的。

  8. DNoTitlebarWindowHelper::windowEvent函数中,对于鼠标移动的距离判断,使用了QGuiApplication::styleHints()->startDragDistance()。这种做法是合理的,但是需要确保在Qt 6中,QGuiApplication::styleHints()的行为是一致的。

  9. DxcbXSettingsDNativeSettings类中,使用了Q_DECL_HIDDEN宏来隐藏这些类的定义。这种做法是合理的,但是需要确保在使用这些类的地方,不会直接访问它们的成员变量或成员函数。

  10. DxcbXSettings类中,Callback结构体的定义使用了Q_DECL_HIDDEN宏。这种做法是合理的,但是需要确保在使用Callback结构体的地方,不会直接访问它的成员变量或成员函数。

总体来说,代码的改动是合理的,但是需要确保在不同版本的Qt中,相关API的行为是一致的,以避免潜在的兼容性问题。

@18202781743 18202781743 merged commit d590290 into master Jul 28, 2025
32 of 33 checks passed
@18202781743 18202781743 deleted the sync-pr-297-nosync branch July 28, 2025 08:09
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