diff options
author | Martin Negyokru <negyokru@inf.u-szeged.hu> | 2022-08-30 18:04:14 +0200 |
---|---|---|
committer | Martin Negyokru <negyokru@inf.u-szeged.hu> | 2022-10-07 19:53:06 +0200 |
commit | e995556338da4d381c457ddd978440f5099af496 (patch) | |
tree | 8448ac81ccb719aed4e9be5d34e4aa890e9f23ce /src/webenginequick/api | |
parent | 1052aaed63bab5f7c10346c097f95793343df5d5 (diff) | |
download | qtwebengine-e995556338da4d381c457ddd978440f5099af496.tar.gz |
Fix logic in bindViewAndDelegateItem
Updating adapterClient is required to Bind
correctly.
Bring back old logic from 6.3.
Fixes: QTBUG-105953
Pick-to: 6.4
Change-Id: I8845948db379c24902df0dd2dad96982a1455531
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginequick/api')
-rw-r--r-- | src/webenginequick/api/qquickwebengineview.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/webenginequick/api/qquickwebengineview.cpp b/src/webenginequick/api/qquickwebengineview.cpp index b566b038e..9ceffe09f 100644 --- a/src/webenginequick/api/qquickwebengineview.cpp +++ b/src/webenginequick/api/qquickwebengineview.cpp @@ -882,11 +882,17 @@ void QQuickWebEngineViewPrivate::bindViewAndDelegateItem(QQuickWebEngineViewPriv // Change pointers first. - if (oldViewPrivate && oldViewPrivate != viewPrivate) - oldViewPrivate->delegateItem = nullptr; + if (delegateItem && oldViewPrivate != viewPrivate) { + if (oldViewPrivate) + oldViewPrivate->delegateItem = nullptr; + delegateItem->m_adapterClient = viewPrivate; + } - if (viewPrivate && oldDelegateItem != delegateItem) + if (viewPrivate && oldDelegateItem != delegateItem) { + if (oldDelegateItem) + oldDelegateItem->m_adapterClient = nullptr; viewPrivate->delegateItem = delegateItem; + } // Then notify. |