summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOliver Wolff <oliver.wolff@qt.io>2018-01-10 10:43:12 +0100
committerOliver Wolff <oliver.wolff@qt.io>2018-01-10 13:38:51 +0000
commit67950a969c37660d35e9da792fbd95a97772e881 (patch)
tree51996fc308d23978daa7eca91e4351ba1efe2052 /src
parent4fab9eb042fc3c3728d926f6b10620d1895cb9dd (diff)
winrt: Remove callback registrations on webview destruction
Change-Id: Ie730be9fa46e5ab2a236c5e7c4a2533789e06a5e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/webview/qwebview_winrt.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/webview/qwebview_winrt.cpp b/src/webview/qwebview_winrt.cpp
index d6ec493..fc999d2 100644
--- a/src/webview/qwebview_winrt.cpp
+++ b/src/webview/qwebview_winrt.cpp
@@ -348,6 +348,10 @@ QWinRTWebViewPrivate::~QWinRTWebViewPrivate()
{
QEventDispatcherWinRT::runOnXamlThread([this]() {
HRESULT hr;
+ hr = d->ext->remove_NavigationStarting(d->navigationStartingToken);
+ Q_ASSERT_SUCCEEDED(hr);
+ hr = d->ext->remove_NavigationCompleted(d->navigationCompletedToken);
+ Q_ASSERT_SUCCEEDED(hr);
ComPtr<IVector<UIElement *>> children;
hr = d->host->get_Children(&children);
Q_ASSERT_SUCCEEDED(hr);