From 4d1d33022a431c3108c4eb33a60d23b0f013d9b8 Mon Sep 17 00:00:00 2001 From: Jocelyn Turcotte Date: Fri, 11 Apr 2014 15:12:26 +0200 Subject: Fix how NewPopupDisposition is exposed in QQuickWebEngineView I initially misintepreted the meaning of the enum, assuming that it meant that the window should possibly be blocked. The user_gesture parameter in WebContentsDelegate::AddNewContents is actually doing this, while the popup disposition means that JavaScript requested the window to be opened without one of the standard decoration (i.e. status bar, menu bar, tool bar, etc.). Update the QtQuick API to reflect this, renaming the "isPopup" parameter to a more familiar "isUserInitiated". The popup disposition is named "dialog" to match the previous QWebPage::WebModalDialog enum. Change-Id: Ib0c4bc53671fcf0dd9499aa1be2bbc8c494ba49e Reviewed-by: Michael Bruning --- src/webengine/api/qquickwebenginenewviewrequest_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/webengine/api/qquickwebenginenewviewrequest_p.h') diff --git a/src/webengine/api/qquickwebenginenewviewrequest_p.h b/src/webengine/api/qquickwebenginenewviewrequest_p.h index ed762cd39..390ca278b 100644 --- a/src/webengine/api/qquickwebenginenewviewrequest_p.h +++ b/src/webengine/api/qquickwebenginenewviewrequest_p.h @@ -52,18 +52,18 @@ QT_BEGIN_NAMESPACE class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineNewViewRequest : public QObject { Q_OBJECT Q_PROPERTY(QQuickWebEngineView::NewViewDestination destination READ destination CONSTANT FINAL) - Q_PROPERTY(bool popup READ isPopup CONSTANT FINAL) + Q_PROPERTY(bool userInitiated READ isUserInitiated CONSTANT FINAL) public: ~QQuickWebEngineNewViewRequest(); QQuickWebEngineView::NewViewDestination destination() const; - bool isPopup() const; + bool isUserInitiated() const; Q_INVOKABLE void openIn(QQuickWebEngineView *view); private: QQuickWebEngineNewViewRequest(); QQuickWebEngineView::NewViewDestination m_destination; - bool m_isPopup; + bool m_isUserInitiated; QExplicitlySharedDataPointer m_adapter; friend class QQuickWebEngineViewPrivate; }; -- cgit v1.2.3