diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-01-08 14:37:40 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-17 14:58:55 +0100 |
commit | 13416b2db167dc1849e4af94391d3c6ae602ec76 (patch) | |
tree | b0adcf4565663bc43a262ec2e535b6f3c4505a18 /src/core/web_contents_adapter.cpp | |
parent | db2c0781218b7dfa03f7bc39b1e2115dbf4a0fb0 (diff) |
Fix QWebEngineView to page reattachment.
This fixes the crash in tst_QWebEngineView::reusePage.
Also add a test to check the case where show() would react incorrectly.
Change-Id: I40247c7c225d74b26675b6a7fa5ff1f06d3bb3e6
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'src/core/web_contents_adapter.cpp')
-rw-r--r-- | src/core/web_contents_adapter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index bb2ac36f4..ce9dccd90 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -218,6 +218,13 @@ void WebContentsAdapter::initialize(WebContentsAdapterClient *adapterClient) contentsView->initialize(adapterClient); } +void WebContentsAdapter::reattachRWHV() +{ + Q_D(WebContentsAdapter); + if (content::RenderWidgetHostView *rwhv = d->webContents->GetRenderWidgetHostView()) + rwhv->InitAsChild(0); +} + bool WebContentsAdapter::canGoBack() const { Q_D(const WebContentsAdapter); |