summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebenginenewviewrequest.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-06-29 13:47:35 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-07-10 09:42:01 +0000
commit088aaa64eb9a6efad107383749985b2b462fa36f (patch)
treeb705e061f6ea1538b9f19b5f8d65b6c3a2387087 /src/webengine/api/qquickwebenginenewviewrequest.cpp
parentf7c4bab9157e25758ba526a6dce9a86fd4d1674e (diff)
Implement missing WebActions in QML API
Implements the remaining WebActions from the widgets API in the QML API, so the available actions matches. Change-Id: I60dfd4a574b80cdd82b8891abfb27a8bfb1b88ec Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/webengine/api/qquickwebenginenewviewrequest.cpp')
-rw-r--r--src/webengine/api/qquickwebenginenewviewrequest.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/webengine/api/qquickwebenginenewviewrequest.cpp b/src/webengine/api/qquickwebenginenewviewrequest.cpp
index 36c5e44e1..dd197dfe4 100644
--- a/src/webengine/api/qquickwebenginenewviewrequest.cpp
+++ b/src/webengine/api/qquickwebenginenewviewrequest.cpp
@@ -90,7 +90,7 @@ bool QQuickWebEngineNewViewRequest::isUserInitiated() const
*/
void QQuickWebEngineNewViewRequest::openIn(QQuickWebEngineView *view)
{
- if (!m_adapter) {
+ if (!m_adapter && !m_requestedUrl.isValid()) {
qWarning("Trying to open an empty request, it was either already used or was invalidated."
"\nYou must complete the request synchronously within the newViewRequested signal handler."
" If a view hasn't been adopted before returning, the request will be invalidated.");
@@ -101,6 +101,9 @@ void QQuickWebEngineNewViewRequest::openIn(QQuickWebEngineView *view)
qWarning("Trying to open a WebEngineNewViewRequest in an invalid WebEngineView.");
return;
}
- view->d_func()->adoptWebContents(m_adapter.data());
+ if (m_adapter)
+ view->d_func()->adoptWebContents(m_adapter.data());
+ else
+ view->setUrl(m_requestedUrl);
m_adapter.reset();
}