diff options
-rw-r--r-- | src/core/api/qwebenginepage.cpp | 4 | ||||
-rw-r--r-- | src/webenginequick/api/qquickwebengineview.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/api/qwebenginepage.cpp b/src/core/api/qwebenginepage.cpp index 84b909bbe..c58ef5e7c 100644 --- a/src/core/api/qwebenginepage.cpp +++ b/src/core/api/qwebenginepage.cpp @@ -1671,8 +1671,8 @@ void QWebEnginePagePrivate::requestGeometryChange(const QRect &geometry, const Q QObject *QWebEnginePagePrivate::dragSource() const { -#if !QT_CONFIG(draganddrop) - return view; +#if QT_CONFIG(draganddrop) + return view->accessibilityParentObject(); #else return nullptr; #endif // QT_CONFIG(draganddrop) diff --git a/src/webenginequick/api/qquickwebengineview.cpp b/src/webenginequick/api/qquickwebengineview.cpp index ae01aad23..8f02648e8 100644 --- a/src/webenginequick/api/qquickwebengineview.cpp +++ b/src/webenginequick/api/qquickwebengineview.cpp @@ -1208,11 +1208,11 @@ QObject *QQuickWebEngineViewPrivate::dragSource() const { // QTBUG-57516 // Fixme: This is just a band-aid workaround. -#if !QT_CONFIG(draganddrop) - return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows) ? - q_ptr->window : nullptr; +#if QT_CONFIG(draganddrop) + return QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::MultipleWindows) ? + q_ptr : nullptr; #else - return nullptr; + return nullptr; #endif } |