Skip to content

fix: wheel event is accepted in qt6#652

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
18202781743:master
Apr 9, 2025
Merged

fix: wheel event is accepted in qt6#652
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
18202781743:master

Conversation

@18202781743
Copy link
Contributor

QApplication::notify has change the default action

we.setAccepted(true);
we.m_spont = wheel->spontaneous() && w == receiver;
res = d->notify_helper(w, &we);
eventAccepted = we.isAccepted();

Event is accepted if we don't call parent class event function,
it cause event will not be passed on to it's parentWidget.
and it's different with qt5.

pms: BUG-306251

QApplication::notify has change the default action
``` qapplication.cpp
we.setAccepted(true);
we.m_spont = wheel->spontaneous() && w == receiver;
res = d->notify_helper(w, &we);
eventAccepted = we.isAccepted();
```
Event is accepted if we don't call parent class event function,
it cause event will not be passed on to it's parentWidget.
and it's different with qt5.

pms: BUG-306251
@18202781743 18202781743 requested review from BLumia and mhduiy April 9, 2025 07:58
@deepin-ci-robot
Copy link
Contributor

deepin pr auto review

关键摘要:

  • else分支中直接调用QWidget::wheelEvent(e)可能会导致事件未被正确处理,应该考虑是否有必要在此处处理事件。

是否建议立即修改:

  • 是,应该确保事件被正确处理,或者提供明确的注释说明为什么在此处调用QWidget::wheelEvent(e)

deepin-ci-robot added a commit to linuxdeepin/dtk6widget that referenced this pull request Apr 9, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#652
@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.

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

@18202781743
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Apr 9, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit fe16c8e into linuxdeepin:master Apr 9, 2025
16 of 21 checks passed
18202781743 pushed a commit to linuxdeepin/dtk6widget that referenced this pull request Apr 9, 2025
Synchronize source files from linuxdeepin/dtkwidget.

Source-pull-request: linuxdeepin/dtkwidget#652
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