diff options
| author | Christian Strømme <christian.stromme@theqtcompany.com> | 2015-05-29 12:23:29 +0200 |
|---|---|---|
| committer | Christian Stromme <christian.stromme@theqtcompany.com> | 2015-06-03 15:13:20 +0000 |
| commit | c73251113d96119e5b937f81bbacfbcff2ef94cb (patch) | |
| tree | 6dff28ea22fcc38f6bad10a6d319aac7b99fb666 /src/webview/qquickwebview.cpp | |
| parent | 9b57e2f1765c0b4db6c3a9edf4277fc784a245f7 (diff) | |
Fix crash on destruction of QWebView instances.v5.5.0
The QWebView and QWebViewPrivate class are now in the object tree and
will therefore be delete once their parent is destroyed.
This change removes the QScopedPointers that used to manage the
lifetime of the webview instances.
Task-number: QTBUG-46286
Change-Id: I2d7f12b317770113e5b35c14b60df7442aa3e68e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/webview/qquickwebview.cpp')
| -rw-r--r-- | src/webview/qquickwebview.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/webview/qquickwebview.cpp b/src/webview/qquickwebview.cpp index 66cbaf8..270da36 100644 --- a/src/webview/qquickwebview.cpp +++ b/src/webview/qquickwebview.cpp @@ -90,13 +90,13 @@ QQuickWebView::QQuickWebView(QQuickItem *parent) : QQuickViewController(parent) , m_webView(new QWebView(this)) { - setView(m_webView.data()); - connect(m_webView.data(), &QWebView::titleChanged, this, &QQuickWebView::titleChanged); - connect(m_webView.data(), &QWebView::urlChanged, this, &QQuickWebView::urlChanged); - connect(m_webView.data(), &QWebView::loadProgressChanged, this, &QQuickWebView::loadProgressChanged); - connect(m_webView.data(), &QWebView::loadingChanged, this, &QQuickWebView::onLoadingChanged); - connect(m_webView.data(), &QWebView::requestFocus, this, &QQuickWebView::onFocusRequest); - connect(m_webView.data(), &QWebView::javaScriptResult, this, &QQuickWebView::onRunJavaScriptResult); + setView(m_webView); + connect(m_webView, &QWebView::titleChanged, this, &QQuickWebView::titleChanged); + connect(m_webView, &QWebView::urlChanged, this, &QQuickWebView::urlChanged); + connect(m_webView, &QWebView::loadProgressChanged, this, &QQuickWebView::loadProgressChanged); + connect(m_webView, &QWebView::loadingChanged, this, &QQuickWebView::onLoadingChanged); + connect(m_webView, &QWebView::requestFocus, this, &QQuickWebView::onFocusRequest); + connect(m_webView, &QWebView::javaScriptResult, this, &QQuickWebView::onRunJavaScriptResult); } QQuickWebView::~QQuickWebView() |
