Skip to content

Conversation

@deepin-ci-robot
Copy link
Contributor

Synchronize source files from linuxdeepin/qt5platform-plugins.

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

Synchronize source files from linuxdeepin/qt5platform-plugins.

Source-pull-request: linuxdeepin/qt5platform-plugins#281
@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. DFrameWindow::updateShadow函数中,添加了killTimer来确保定时器不会在频繁调用updateShadow时被遗漏。这是一个好的做法,可以避免定时器累积的问题。

  2. DPlatformWindowHelper::eventFilter函数中,对于QEvent的处理,代码进行了重构,增加了对e->points().isEmpty()的检查。这确保了在处理事件之前,事件点列表不为空,避免了潜在的空指针访问。

  3. DPlatformWindowHelper::eventFilter函数中,对于QEvent的处理,代码使用了QEventPoint::withTimeStampQMutableEventPoint::update来创建和更新事件点。这是一个更清晰和安全的做法,避免了直接操作原始事件点。

  4. DPlatformWindowHelper::eventFilter函数中,对于QEvent的处理,代码在处理完m_frameWindow->mouseMoveEvent(e)后,再次发送了事件qApp->sendEvent(m_nativeWindow->window(), e)。这可能是为了确保事件被正确地传递给目标窗口,但需要确认这是否是预期的行为。

  5. DPlatformWindowHelper::eventFilter函数中,对于QEvent的处理,代码在处理完m_frameWindow->mouseMoveEvent(e)后,将事件源设置为Qt::MouseEventSynthesizedByQt。这可能是为了确保事件被正确地识别为由Qt合成的事件,但需要确认这是否是预期的行为。

  6. DPlatformWindowHelper::requestActivateWindow函数中,代码使用了条件编译来处理不同版本的Qt。这是一个好的做法,可以确保代码在不同版本的Qt上都能正确运行。但是,需要确保在Qt 6.8及以上版本中,helper->m_frameWindow->handle()->requestActivateWindow()的调用是必要的,并且不会导致递归调用问题。

  7. DPlatformWindowHelper::requestActivateWindow函数中,代码在处理有parent的窗口时,调用了xcb_set_input_focus。这是一个好的做法,可以确保窗口获得输入焦点。

总体来说,代码的修改提高了代码的可读性和安全性,但需要进一步确认某些修改的必要性,例如事件处理部分的修改。

@18202781743 18202781743 merged commit d5ede4e into master Mar 19, 2025
29 of 31 checks passed
@18202781743 18202781743 deleted the sync-pr-281-nosync branch March 19, 2025 03:19
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