Revert "QGestureManager: use gesture owner target if topLevelAt returns nullptr"
This reverts commit 10c3dd87d3bc2e84d4f477888622f5fc7ed5d502. QtWidgets depends on the old QApplication::topLevelAt() behavior too much, especially for the single top level window case. It's not easy to be decoupled in this way. Task-number: QTBUG-113404 Task-number: QTBUG-125878 Task-number: QTBUG-126313 Pick-to: 6.7 6.5 Change-Id: Ica9753bfc85f54ef24ff3db12ea954b06b50b1f0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 04b8b61ce56d552c1240a8f5e3f089edc7b56f52) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
2a10643d44
commit
38ce3c67be
@ -610,8 +610,7 @@ void QGestureManager::deliverEvents(const QSet<QGesture *> &gestures,
|
||||
QWidget *child = topLevel->childAt(topLevel->mapFromGlobal(pt));
|
||||
target = child ? child : topLevel;
|
||||
}
|
||||
}
|
||||
if (!target) {
|
||||
} else {
|
||||
// or use the context of the gesture
|
||||
QObject *context = m_gestureOwners.value(gesture, 0);
|
||||
if (context->isWidgetType())
|
||||
|
Loading…
x
Reference in New Issue
Block a user