diff options
Diffstat (limited to 'src/widgets/kernel/qapplication.cpp')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 6258605a65..c6d59907a0 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -3290,7 +3290,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) QWheelEvent we(relpos, wheel->globalPos(), wheel->pixelDelta(), wheel->angleDelta(), wheel->delta(), wheel->orientation(), wheel->buttons(), wheel->modifiers(), phase, wheel->source(), wheel->inverted()); bool eventAccepted; - while (w) { + do { we.spont = spontaneous && w == receiver; we.ignore(); res = d->notify_helper(w, &we); @@ -3308,7 +3308,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) we.p += w->pos(); w = w->parentWidget(); - } + } while (w); wheel->setAccepted(eventAccepted); } else if (!spontaneous) { // wheel_widget may forward the wheel event to a delegate widget, @@ -4482,9 +4482,13 @@ void QApplicationPrivate::notifyThemeChanged() #ifndef QT_NO_DRAGANDDROP void QApplicationPrivate::notifyDragStarted(const QDrag *drag) { - // Prevent pickMouseReceiver() from using the widget where the drag was started after a drag operation. QGuiApplicationPrivate::notifyDragStarted(drag); - qt_button_down = 0; + // QTBUG-26145 + // Prevent pickMouseReceiver() from using the widget where the drag was started after a drag operation... + // QTBUG-56713 + // ...only if qt_button_down is not a QQuickWidget + if (qt_button_down && !qt_button_down->inherits("QQuickWidget")) + qt_button_down = nullptr; } #endif // QT_NO_DRAGANDDROP |