diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-09-09 13:43:09 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-10 15:20:42 +0000 |
commit | eedb31a06807a0ce9f9c580d17deed06655c5047 (patch) | |
tree | 750558704d2078f4294119378c394671ba5376e8 | |
parent | db72fec840b5821d03b90d33260be42f69217845 (diff) |
Fix drag and drop again
Return the right QObjects
Fixes: QTBUG-96308
Change-Id: If04be10fe19db6b8c0552c7df588961c711c1250
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
(cherry picked from commit e85e4ab275fb0a0c072f19ed3d5c5b5b46de8321)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-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 } |