summaryrefslogtreecommitdiffstats
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/api/qquickwebenginehistory.cpp102
-rw-r--r--src/webengine/api/qquickwebenginesettings.cpp12
-rw-r--r--src/webengine/api/qquickwebenginesingleton.cpp36
-rw-r--r--src/webengine/api/qquickwebenginetestsupport_p.h1
-rw-r--r--src/webengine/api/qquickwebengineview.cpp14
-rw-r--r--src/webengine/api/qquickwebengineview_p.h2
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h1
-rw-r--r--src/webengine/doc/qtwebengine.qdocconf25
-rw-r--r--src/webengine/doc/src/external-resources.qdoc48
-rw-r--r--src/webengine/doc/src/qtwebengine-devtools.qdoc6
-rw-r--r--src/webengine/doc/src/qtwebengine-index.qdoc4
-rw-r--r--src/webengine/doc/src/qtwebengine-modules.qdoc42
-rw-r--r--src/webengine/doc/src/qtwebengine-overview.qdoc17
-rw-r--r--src/webengine/doc/src/qtwebengine-platform-notes.qdoc52
-rw-r--r--src/webengine/doc/src/qtwebengine-qmlmodule.qdoc2
-rw-r--r--src/webengine/doc/src/webengineview.qdoc321
-rw-r--r--src/webengine/plugin/plugins.qmltypes99
-rw-r--r--src/webengine/ui_delegates_manager.cpp4
18 files changed, 654 insertions, 134 deletions
diff --git a/src/webengine/api/qquickwebenginehistory.cpp b/src/webengine/api/qquickwebenginehistory.cpp
index 9a737fbbe..175b52248 100644
--- a/src/webengine/api/qquickwebenginehistory.cpp
+++ b/src/webengine/api/qquickwebenginehistory.cpp
@@ -118,6 +118,26 @@ int QQuickWebEngineForwardHistoryListModelPrivate::offsetForIndex(int index) con
return index + 1;
}
+/*!
+ \qmltype WebEngineHistoryListModel
+ \instantiates QQuickWebEngineHistoryListModel
+ \inqmlmodule QtWebEngine 1.1
+ \since QtWebEngine 1.1
+
+ \brief A data model that represents the history of a web engine page.
+
+ The WebEngineHistoryListModel type exposes the \e title, \e url, and \e offset roles. The
+ \e title and \e url specify the title and URL of the visited page. The \e offset specifies
+ the position of the page in respect to the current page (0). A positive number indicates that
+ the page was visited after the current page, whereas a negative number indicates that the page
+ was visited before the current page.
+
+ This type is uncreatable, but it can be accessed by using the
+ \l{WebEngineView::navigationHistory}{WebEngineView.navigationHistory} property.
+
+ \sa WebEngineHistory
+*/
+
QQuickWebEngineHistoryListModel::QQuickWebEngineHistoryListModel()
: QAbstractListModel()
{
@@ -185,6 +205,67 @@ QQuickWebEngineHistoryPrivate::~QQuickWebEngineHistoryPrivate()
{
}
+/*!
+ \qmltype WebEngineHistory
+ \instantiates QQuickWebEngineHistory
+ \inqmlmodule QtWebEngine 1.1
+ \since QtWebEngine 1.1
+
+ \brief Provides data models that represent the history of a web engine page.
+
+ The WebEngineHistory type can be accessed by using the
+ \l{WebEngineView::navigationHistory}{WebEngineView.navigationHistory} property.
+
+ The WebEngineHistory type providess the following WebEngineHistoryListModel data model objects:
+
+ \list
+ \li \c backItems, which contains the URLs of visited pages.
+ \li \c forwardItems, which contains the URLs of the pages that were visited after visiting
+ the current page.
+ \li \c items, which contains the URLs of the back and forward items, as well as the URL of
+ the current page.
+ \endlist
+
+ The easiest way to use these models is to use them in a ListView as illustrated by the
+ following code snippet:
+
+ \code
+ ListView {
+ id: historyItemsList
+ anchors.fill: parent
+ model: webEngineView.navigationHistory.items
+ delegate:
+ Text {
+ color: "black"
+ text: model.title + " - " + model.url + " (" + model.offset + ")"
+ }
+ }
+ \endcode
+
+ The ListView shows the content of the corresponding model. The delegate is responsible for the
+ format of the list items. The appearance of each item of the list in the delegate can be defined
+ separately (it is not web engine specific).
+
+ The model roles \e title and \e url specify the title and URL of the visited page. The \e offset
+ role specifies the position of the page in respect to the current page (0). A positive number
+ indicates that the page was visited after the current page, whereas a negative number indicates
+ that the page was visited before the current page.
+
+ The data models can also be used to create a menu, as illustrated by the following code
+ snippet:
+
+ \quotefromfile webengine/quicknanobrowser/browserwindow.qml
+ \skipto ToolBar
+ \printuntil onObjectRemoved
+ \printuntil }
+ \printuntil }
+ \printuntil }
+
+ For the complete example, see \l{WebEngine Quick Nano Browser}.
+
+ \sa WebEngineHistoryListModel
+*/
+
QQuickWebEngineHistory::QQuickWebEngineHistory(QQuickWebEngineViewPrivate *view)
: d_ptr(new QQuickWebEngineHistoryPrivate(view))
{
@@ -194,6 +275,13 @@ QQuickWebEngineHistory::~QQuickWebEngineHistory()
{
}
+/*!
+ \qmlproperty QQuickWebEngineHistoryListModel WebEngineHistory::items
+ \readonly
+ \since QtWebEngine 1.1
+
+ URLs of back items, forward items, and the current item in the history.
+*/
QQuickWebEngineHistoryListModel *QQuickWebEngineHistory::items() const
{
Q_D(const QQuickWebEngineHistory);
@@ -202,6 +290,13 @@ QQuickWebEngineHistoryListModel *QQuickWebEngineHistory::items() const
return d->m_navigationModel.data();
}
+/*!
+ \qmlproperty QQuickWebEngineHistoryListModel WebEngineHistory::backItems
+ \readonly
+ \since QtWebEngine 1.1
+
+ URLs of visited pages.
+*/
QQuickWebEngineHistoryListModel *QQuickWebEngineHistory::backItems() const
{
Q_D(const QQuickWebEngineHistory);
@@ -210,6 +305,13 @@ QQuickWebEngineHistoryListModel *QQuickWebEngineHistory::backItems() const
return d->m_backNavigationModel.data();
}
+/*!
+ \qmlproperty QQuickWebEngineHistoryListModel WebEngineHistory::forwardItems
+ \readonly
+ \since QtWebEngine 1.1
+
+ URLs of the pages that were visited after visiting the current page.
+*/
QQuickWebEngineHistoryListModel *QQuickWebEngineHistory::forwardItems() const
{
Q_D(const QQuickWebEngineHistory);
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index 539f211b0..8f2e1bcf2 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -54,13 +54,15 @@ QQuickWebEngineSettings::QQuickWebEngineSettings(QQuickWebEngineSettings *parent
\instantiates QQuickWebEngineSettings
\inqmlmodule QtWebEngine
\since QtWebEngine 1.1
- \brief WebEngineSettings allows configuration of browser properties and attributes.
+ \brief Allows configuration of browser properties and attributes.
- WebEngineSettings allows configuration of browser properties and generic attributes, such as
- JavaScript support, focus behavior, and access to remote content.
-
- Each WebEngineView can have individual settings.
+ The WebEngineSettings type can be used to configure browser properties and generic
+ attributes, such as JavaScript support, focus behavior, and access to remote content. This type
+ is uncreatable, but the default settings for all web engine views can be accessed by using
+ the \l [QML] {WebEngine::settings}{WebEngine.settings} property.
+ Each web engine view can have individual settings that can be accessed by using the
+ \l{WebEngineView::settings}{WebEngineView.settings} property.
*/
diff --git a/src/webengine/api/qquickwebenginesingleton.cpp b/src/webengine/api/qquickwebenginesingleton.cpp
index 3f0c8cb65..7ff974eb4 100644
--- a/src/webengine/api/qquickwebenginesingleton.cpp
+++ b/src/webengine/api/qquickwebenginesingleton.cpp
@@ -41,11 +41,47 @@
QT_BEGIN_NAMESPACE
+/*!
+ \qmltype WebEngine
+ \instantiates QQuickWebEngineSingleton
+ \inqmlmodule QtWebEngine 1.1
+ \since QtWebEngine 1.1
+ \brief Provides access to the default settings and profiles shared by all web engine views.
+
+ The WebEngine singleton type provides access to the default profile and the default settings
+ shared by all web engine views. It can be used to change settings globally, as illustrated by
+ the following code snippet:
+
+ \code
+ Component.onCompleted: {
+ WebEngine.settings.javaScriptEnabled = true;
+ }
+ \endcode
+*/
+
+/*!
+ \qmlproperty WebEngineSettings WebEngine::settings
+ \readonly
+ \since QtWebEngine 1.1
+
+ Default settings for all web engine views.
+
+ \sa WebEngineSettings
+*/
QQuickWebEngineSettings *QQuickWebEngineSingleton::settings() const
{
return defaultProfile()->settings();
}
+/*!
+ \qmlproperty WebEngineProfile WebEngine::defaultProfile
+ \readonly
+ \since QtWebEngine 1.1
+
+ Default profile for all web engine views.
+
+ \sa WebEngineProfile
+*/
QQuickWebEngineProfile *QQuickWebEngineSingleton::defaultProfile() const
{
return QQuickWebEngineProfile::defaultProfile();
diff --git a/src/webengine/api/qquickwebenginetestsupport_p.h b/src/webengine/api/qquickwebenginetestsupport_p.h
index 9690e538d..d4b50ac2d 100644
--- a/src/webengine/api/qquickwebenginetestsupport_p.h
+++ b/src/webengine/api/qquickwebenginetestsupport_p.h
@@ -80,6 +80,7 @@ public:
Q_SIGNALS:
void validationMessageShown(const QString &mainText, const QString &subText);
+ void windowCloseRejected();
private:
QScopedPointer<QQuickWebEngineErrorPage> m_errorPage;
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index c1b21adfa..d2fb7f19a 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -507,7 +507,16 @@ void QQuickWebEngineViewPrivate::adoptNewWindow(WebContentsAdapter *newWebConten
void QQuickWebEngineViewPrivate::close()
{
- // Not implemented yet.
+ Q_Q(QQuickWebEngineView);
+ emit q->windowCloseRequested();
+}
+
+void QQuickWebEngineViewPrivate::windowCloseRejected()
+{
+#ifdef ENABLE_QML_TESTSUPPORT_API
+ if (m_testSupport)
+ Q_EMIT m_testSupport->windowCloseRejected();
+#endif
}
void QQuickWebEngineViewPrivate::requestFullScreen(bool fullScreen)
@@ -1315,6 +1324,9 @@ void QQuickWebEngineView::triggerWebAction(WebAction action)
case ExitFullScreen:
d->adapter->exitFullScreen();
break;
+ case RequestClose:
+ d->adapter->requestClose();
+ break;
default:
Q_UNREACHABLE();
}
diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h
index b512648dd..b0fd5cff6 100644
--- a/src/webengine/api/qquickwebengineview_p.h
+++ b/src/webengine/api/qquickwebengineview_p.h
@@ -230,6 +230,7 @@ public:
InspectElement,
ExitFullScreen,
+ RequestClose,
Unselect,
WebActionCount
@@ -310,6 +311,7 @@ Q_SIGNALS:
Q_REVISION(2) void activeFocusOnPressChanged(bool);
Q_REVISION(2) void backgroundColorChanged();
Q_REVISION(2) void renderProcessTerminated(RenderProcessTerminationStatus terminationStatus, int exitCode);
+ Q_REVISION(2) void windowCloseRequested();
Q_REVISION(3) void contentsSizeChanged(const QSizeF& size);
Q_REVISION(3) void scrollPositionChanged(const QPointF& position);
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index 08d584192..f2924fafb 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -143,6 +143,7 @@ public:
virtual void unhandledKeyEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
virtual void adoptNewWindow(QtWebEngineCore::WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &) Q_DECL_OVERRIDE;
virtual void close() Q_DECL_OVERRIDE;
+ virtual void windowCloseRejected() Q_DECL_OVERRIDE;
virtual void requestFullScreen(bool) Q_DECL_OVERRIDE;
virtual bool isFullScreen() const Q_DECL_OVERRIDE;
virtual bool contextMenuRequested(const QtWebEngineCore::WebEngineContextMenuData &) Q_DECL_OVERRIDE;
diff --git a/src/webengine/doc/qtwebengine.qdocconf b/src/webengine/doc/qtwebengine.qdocconf
index f833cf0d2..e277f4190 100644
--- a/src/webengine/doc/qtwebengine.qdocconf
+++ b/src/webengine/doc/qtwebengine.qdocconf
@@ -4,7 +4,7 @@ project = QtWebEngine
description = Qt WebEngine Reference Documentation
version = $QT_VERSION
-examplesinstallpath = webengine
+examplesinstallpath =
qhp.projects = QtWebEngine
@@ -44,21 +44,24 @@ depends += qtcore \
qtquickcontrols \
qtdoc \
qtwebchannel \
- qtwebenginewidgets
+ qtwidgets
-headerdirs += . \
- ../api \
- ../../core/api
+headerdirs += .. \
+ ../../core \
+ ../../webenginewidgets
-sourcedirs += . \
- ../api \
- ../../core/api \
- ../../core/doc/src
+sourcedirs += .. \
+ ../../core/ \
+ ../../webenginewidgets \
exampledirs += . \
- ../../../examples/webengine \
+ ../../../examples \
snippets \
- ../../core/doc/snippets
+ ../../core/doc/snippets \
+ ../../webenginewidgets/doc/snippets
+
+
+imagedirs += images
navigation.landingpage = "Qt WebEngine"
navigation.cppclassespage = "Qt WebEngine C++ Classes"
diff --git a/src/webengine/doc/src/external-resources.qdoc b/src/webengine/doc/src/external-resources.qdoc
new file mode 100644
index 000000000..34a66291e
--- /dev/null
+++ b/src/webengine/doc/src/external-resources.qdoc
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \externalpage http://www.chromium.org
+ \title Chromium Project
+*/
+
+/*!
+ \externalpage https://developers.google.com/web/tools/chrome-devtools
+ \title Chrome DevTools
+*/
+
+/*
+ This prevents autolinking of each occurrence of 'WebEngine'
+ To link to the WebEngine QML type, use explicit linking:
+ \l [QML] WebEngine
+ \sa {QtWebEngine::}{WebEngine}
+*/
+/*!
+ \externalpage nolink
+ \title WebEngine
+ \internal
+*/
diff --git a/src/webengine/doc/src/qtwebengine-devtools.qdoc b/src/webengine/doc/src/qtwebengine-devtools.qdoc
index 008fa925b..ee87214e1 100644
--- a/src/webengine/doc/src/qtwebengine-devtools.qdoc
+++ b/src/webengine/doc/src/qtwebengine-devtools.qdoc
@@ -37,9 +37,11 @@
To activate the developer tools, start an application that uses Qt
WebEngine with the command-line arguments:
- \code
+
+ \badcode
--remote-debugging-port=<port_number>
\endcode
+
Where \c <port_number> refers to a local network port. The web developer
tools can then be accessed by launching a browser at the address
\c http://localhost:<port_number>.
@@ -52,5 +54,5 @@
device.
For a detailed explanation of the capabilities of developer tools, see the
- \l{https://developers.google.com/web/tools/chrome-devtools}{Chrome DevTools page}.
+ \l {Chrome DevTools} page.
*/
diff --git a/src/webengine/doc/src/qtwebengine-index.qdoc b/src/webengine/doc/src/qtwebengine-index.qdoc
index 20d2de48c..e67bd43fd 100644
--- a/src/webengine/doc/src/qtwebengine-index.qdoc
+++ b/src/webengine/doc/src/qtwebengine-index.qdoc
@@ -69,6 +69,7 @@
\list
\li \l{Qt WebEngine Overview}
+ \li \l{Qt WebEngine Platform Notes}
\li \l{Qt WebEngine Web Developer Tools}
\li \l{Porting from Qt WebKit to Qt WebEngine}
\endlist
@@ -83,8 +84,7 @@
\section1 API References
\list
- \li \l{Qt WebEngine Core C++ Classes}
- \li \l{Qt WebEngine Widgets C++ Classes}
+ \li \l{Qt WebEngine C++ Classes}
\li \l{Qt WebEngine QML Types}
\endlist
*/
diff --git a/src/webengine/doc/src/qtwebengine-modules.qdoc b/src/webengine/doc/src/qtwebengine-modules.qdoc
new file mode 100644
index 000000000..2e1b4c947
--- /dev/null
+++ b/src/webengine/doc/src/qtwebengine-modules.qdoc
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtwebengine-modules.html
+ \title Qt WebEngine C++ Classes
+ \brief Provides functionality for rendering regions of dynamic web content.
+
+ \e {Qt WebEngine} provides functionality for rendering regions of dynamic web content.
+
+ \section1 Classes
+
+ \section2 Qt WebEngineCore Module
+ \generatelist {classesbymodule QtWebEngineCore}
+
+ \section2 Qt WebEngineWidgets Module
+ \generatelist {classesbymodule QtWebEngineWidgets}
+*/
diff --git a/src/webengine/doc/src/qtwebengine-overview.qdoc b/src/webengine/doc/src/qtwebengine-overview.qdoc
index 656dd13f1..15052f6e8 100644
--- a/src/webengine/doc/src/qtwebengine-overview.qdoc
+++ b/src/webengine/doc/src/qtwebengine-overview.qdoc
@@ -39,7 +39,8 @@
made fully editable by the user through the use of the \c{contenteditable} attribute on HTML
elements.
- Qt WebEngine supercedes the \l{Qt WebKit Widgets}{Qt WebKit} module, which is based on the
+ Qt WebEngine supercedes the \l{http://doc.qt.io/archives/qt-5.3/qtwebkit-index.html}{Qt WebKit}
+ module, which is based on the
WebKit project, but has not been actively synchronized with the upstream WebKit code since
Qt 5.2 and has been deprecated in Qt 5.5. For tips on how to change a Qt WebKit widgets
application to use Qt WebEngine widgets, see \l{Porting from Qt WebKit to Qt WebEngine}. For new
@@ -60,11 +61,11 @@
Qt WebEngine Widgets
\endlist
- The Qt WebEngine core is based on the \l{http://www.chromium.org}{Chromium Project}. Chromium
- provides its own network and painting engines and is developed tightly together with its
- dependent modules, and therefore Qt WebEngine provides better and more reliable support for the
- latest HTML5 specification than Qt WebKit. However, Qt WebEngine is thus heavier than Qt WebKit
- and does not provide direct access to the network stack and the HTML document through C++ APIs.
+ The Qt WebEngine core is based on the \l {Chromium Project}. Chromium provides its own network
+ and painting engines and is developed tightly together with its dependent modules, and
+ therefore Qt WebEngine provides better and more reliable support for the latest HTML5
+ specification than Qt WebKit. However, Qt WebEngine is thus heavier than Qt WebKit and does
+ not provide direct access to the network stack and the HTML document through C++ APIs.
Chromium is tightly integrated to the \l{Qt Quick Scene Graph}{Qt Quick scene graph}, which is
based on OpenGL ES 2.0 or OpenGL 2.0 for its rendering. This provides you with one-pass
@@ -103,7 +104,7 @@
The following sample QML application loads a web page and responds to session history context:
- \code
+ \qml
import QtQuick 2.1
import QtQuick.Controls 1.1
import QtWebEngine 1.1
@@ -118,7 +119,7 @@
anchors.fill: parent
}
}
- \endcode
+ \endqml
\section1 Using WebEngine Core
diff --git a/src/webengine/doc/src/qtwebengine-platform-notes.qdoc b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
new file mode 100644
index 000000000..86cccfa3c
--- /dev/null
+++ b/src/webengine/doc/src/qtwebengine-platform-notes.qdoc
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtwebengine-platform-notes.html
+ \title Qt WebEngine Platform Notes
+
+ \brief Contains information about issues that are specific to the Qt WebEngine module.
+
+ \section1 Building Qt WebEngine from Source
+
+ The requirements for building Qt 5 modules from source are listed separately for each supported
+ platform:
+
+ \list
+ \li \l{Qt for Windows - Requirements}
+ \li \l{Qt for X11 Requirements}
+ \li \l{Qt for OS X - Requirements}
+ \endlist
+
+ In addition, the following tools are required for building the \l {Qt WebEngine} module:
+
+ \list
+ \li Windows: Visual Studio 2013 or Visual Studio 2013 Express
+ \li Linux: Clang or GCC version 4.7 or later
+ \li OS X: Xcode version 5.1 or later
+ \endlist
+*/
diff --git a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
index 6d3d71896..e098071b3 100644
--- a/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
+++ b/src/webengine/doc/src/qtwebengine-qmlmodule.qdoc
@@ -32,7 +32,7 @@
The QML types can be imported into your application using the following import statements in
your .qml file:
- \code
+ \badcode
import QtQuick 2.0
import QtWebEngine 1.1
\endcode
diff --git a/src/webengine/doc/src/webengineview.qdoc b/src/webengine/doc/src/webengineview.qdoc
index f763227e4..f230ba261 100644
--- a/src/webengine/doc/src/webengineview.qdoc
+++ b/src/webengine/doc/src/webengineview.qdoc
@@ -75,6 +75,7 @@
/*!
\qmlmethod void WebEngineView::reloadAndBypassCache()
+ \since QtWebEngine 1.1
Reloads the current page, ignoring any cached content.
@@ -84,7 +85,7 @@
/*!
\qmlproperty url WebEngineView::url
- The location of the currently displaying HTML page. This writable
+ The location of the currently displayed HTML page. This writable
property offers the main interface to load a page into a web view.
It functions the same as the \c{window.location} DOM property.
@@ -95,7 +96,7 @@
\qmlproperty url WebEngineView::icon
\readonly
- This property holds the location of the currently displaying web site icon,
+ The location of the currently displayed web site icon,
also known as favicon or shortcut icon. This read-only URL corresponds to
the image used within a mobile browser application to represent a
bookmarked page on the device's home screen.
@@ -103,20 +104,20 @@
The following snippet uses the \c{icon} property to build an \c{Image}
component:
- \code
+ \qml
Image {
id: appIcon
source: webView.icon != "" ? webView.icon : "fallbackFavIcon.png";
- ...
+ // ...
}
- \endcode
+ \endqml
*/
/*!
\qmlproperty int WebEngineView::loadProgress
\readonly
- This property holds the amount of the page that has been loaded, expressed
+ The amount of data from the page that has been loaded, expressed
as an integer percentage in the range from \c{0} to \c{100}.
*/
@@ -147,7 +148,7 @@
\qmlproperty string WebEngineView::title
\readonly
- This property holds the title of the currently displaying HTML page, a
+ The title of the currently displayed HTML page. This is a
read-only value that reflects the contents of the \c{<title>} tag.
*/
@@ -207,6 +208,7 @@
/*!
\qmlproperty list<WebEngineScript> WebEngineView::userScripts
\readonly
+ \since QtWebEngine 1.1
List of script objects attached to the view.
*/
@@ -221,15 +223,15 @@
/*!
\qmlmethod void WebEngineView::loadHtml(string html, url baseUrl)
- \brief Loads the specified \a html as the content of the web view.
+ Loads the specified \a html as the content of the web view.
This method offers a lower-level alternative to the \c{url} property,
which references HTML pages via URL.
- External objects such as stylesheets or images referenced in the HTML
- document should be located relative to \a baseUrl. For example, if \a html
+ External objects, such as stylesheets or images referenced in the HTML
+ document, should be located relative to \a baseUrl. For example, if \a html
is retrieved from \c http://www.example.com/documents/overview.html, which
- is the base url, then an image referenced with the relative url, \c diagram.png,
+ is the base URL, then an image referenced with the relative URL, \c diagram.png,
should be at \c{http://www.example.com/documents/diagram.png}.
\sa url
@@ -237,15 +239,19 @@
/*!
\qmlmethod void WebEngineView::runJavaScript(string script, variant callback)
- \brief Runs the specified \a script in the content of the web view.
+ Runs the specified \a script in the content of the web view.
- In case a callback function is provided it will be invoked after the script
- finished running.
+ In case a callback function is provided, it will be invoked after the script
+ finishes running.
\code
runJavaScript("document.title", function(result) { console.log(result); });
\endcode
+ The script will run in the same \e world as other scripts that are
+ part of the loaded site.
+
+ See WebEngineView::userScripts for an alternative API to inject scripts.
*/
/*!
@@ -305,7 +311,7 @@
Immediately sets \c{isFullScreen} property to \c{false}. It can be used to notify the
browser engine when the windowing system forces the application to leave fullscreen mode.
- \code
+ \qml
ApplicationWindow {
onVisibilityChanged: {
if (webEngineView.isFullScreen && visibility != Window.FullScreen)
@@ -314,16 +320,37 @@
WebEngineView {
id: webEngineView
- ...
+ // ...
}
}
- \endcode
+ \endqml
\sa isFullScreen, fullScreenRequested()
*/
/*!
+ \qmlmethod void WebEngineView::setActiveFocusOnPress(bool arg)
+ \since QtWebEngine 1.2
+
+ Sets active focus to a clicked web engine view if \a arg is \c true. By setting it to \c false,
+ a web engine view can be used to create a UI element that should not get focus. This can be
+ useful in a hybrid UI.
+
+ \sa activeFocusOnPressChanged()
+*/
+
+/*!
+ \qmlmethod void WebEngineView::triggerWebAction(WebAction action)
+ \since QtWebEngine 1.2
+
+ Triggers the web action \a action.
+
+ \sa WebAction
+*/
+
+/*!
\qmlsignal WebEngineView::featurePermissionRequested(url securityOrigin, Feature feature)
+ \since QtWebEngine 1.1
This signal is emitted when the web site identified by \a securityOrigin requests
to make use of the resource or device identified by \a feature.
@@ -335,9 +362,9 @@
\qmlsignal WebEngineView::loadingChanged(loadRequest)
This signal is emitted when a page load begins, ends, or fails.
- The corresponding handler is onLoadingChanged.
+ The corresponding handler is \c onLoadingChanged.
- When handling the signal with onLoadingChanged, various read-only
+ When handling the signal with \c onLoadingChanged, various read-only
parameters are available on the \a loadRequest:
\table
@@ -349,10 +376,7 @@
\li The location of the resource that is loading.
\row
\li status
- \li Reflects one of four load states:
- \c{WebEngineView::LoadStartedStatus}, \c{WebEngineView::LoadStoppedStatus},
- \c{WebEngineView::LoadSucceededStatus}, or \c{WebEngineView::LoadFailedStatus}.
- See WebEngineLoadRequest::status and WebEngineView::LoadStatus.
+ \li The \l{LoadStatus}{load status} of the page.
\row
\li errorString
\li The description of load error.
@@ -361,13 +385,10 @@
\li The HTTP error code.
\row
\li errorDomain
- \li The high-level error types, one of
- \c{WebEngineView::ConnectionErrorDomain}, \c{WebEngineView::HttpErrorDomain}, \c{WebEngineView::InternalErrorDomain},
- \c{WebEngineView::DownloadErrorDomain}, or \c{WebEngineView::NoErrorDomain}. See
- \l{WebEngineView::ErrorDomain} for the full list.
+ \li The high-level \l{ErrorDomain}{error type}.
\endtable
- \sa loading
+ \sa loading, LoadStatus, ErrorDomain
*/
/*!
@@ -379,14 +400,14 @@
The certificate error can be rejected by calling WebEngineCertificateError::rejectCertificate,
which will stop loading the request.
- The certificate error can be ignored by calling WebEngineCertificateError::ignoreCertificateError
- which will resume loading the request.
+ The certificate error can be ignored by calling
+ WebEngineCertificateError::ignoreCertificateError, which will resume loading the request.
It is possible to defer the decision of rejecting the given certificate by calling
WebEngineCertificateError::defer, which is useful when waiting for user input.
- By default the invalid certificate will be automatically rejected.
+ By default, the invalid certificate will be automatically rejected.
- The corresponding handler is onCertificateError.
+ The corresponding handler is \c onCertificateError.
\sa WebEngineCertificateError
*/
@@ -400,19 +421,20 @@
events that are not cancelled with \c{preventDefault()}. \a{hoveredUrl}
provides the link's location.
- The corresponding handler is onLinkHovered.
+ The corresponding handler is \c onLinkHovered.
*/
/*!
\qmlsignal WebEngineView::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, message, lineNumber, sourceID)
This signal is emitted when a JavaScript program tries to print a \a message to the web browser's console.
- For example in case of evaluation errors the source URL may be provided in \a sourceID as well as the \a lineNumber.
+ For example, in case of evaluation errors the source URL may be provided in \a sourceID as well
+ as the \a lineNumber.
- \a level indicates the severity of the event that triggered the message, i.e. if it
+ \a level indicates the severity of the event that triggered the message, that is, whether it
was triggered by an error or a less severe event.
- The corresponding handler is onJavaScriptConsoleMessage.
+ The corresponding handler is \c onJavaScriptConsoleMessage.
*/
/*!
@@ -420,18 +442,18 @@
\since QtWebEngine 1.1
This signal is emitted when a page load is requested to happen in a separate
- WebEngineView. This can either be because the current page requested it explicitly
- through a JavaScript call to window.open, or because the user clicked on a link
- while holding Shift, Ctrl or a built-in combination that triggers the page to open
+ web engine view. This can either be because the current page requested it explicitly
+ through a JavaScript call to \c window.open, or because the user clicked on a link
+ while holding Shift, Ctrl, or a built-in combination that triggers the page to open
in a new window.
- If this signal isn't handled the requested load will fail.
+ If this signal is not handled, the requested load will fail.
An example implementation:
\snippet snippets/qtwebengine_webengineview_newviewrequested.qml 0
- The corresponding handler is onNewViewRequested.
+ The corresponding handler is \c onNewViewRequested.
\sa WebEngineNewViewRequest, NewViewDestination, {WebEngine Quick Nano Browser}
*/
@@ -443,15 +465,54 @@
This signal is emitted when the web page requests fullscreen mode through the
JavaScript API.
- The corresponding handler is onFullScreenRequested.
+ The corresponding handler is \c onFullScreenRequested.
\sa WebEngineFullScreenRequest, isFullScreen
*/
/*!
+ \qmlsignal WebEngineView::activeFocusOnPressChanged(bool)
+ \since QtWebEngine 1.2
+
+ This signal is emitted when the ability of the web engine view to get focus when clicked
+ changes.
+
+ \sa setActiveFocusOnPress()
+*/
+
+/*!
+ \qmlsignal WebEngineView::backgroundColorChanged()
+ \since QtWebEngine 1.2
+
+ This signal is emitted when the web engine view background color changes.
+*/
+
+/*!
+ \qmlsignal WebEngineView::renderProcessTerminated(RenderProcessTerminationStatus terminationStatus, int exitCode)
+
+ \since QtWebEngine 1.2
+
+ This signal is emitted when the render process is terminated with a non-zero exit status.
+ \a terminationStatus is the termination status of the process and \a exitCode is the status code
+ with which the process terminated.
+
+ \sa RenderProcessTerminationStatus
+*/
+
+/*!
+ \qmlsignal WebEngineView::windowCloseRequested()
+ \since QtWebEngine 1.2
+
+ This signal is emitted whenever the page requests the web browser window to be closed,
+ for example through the JavaScript \c{window.close()} call.
+
+ The corresponding handler is \c onWindowCloseRequested.
+*/
+
+/*!
\qmlproperty enumeration WebEngineView::ErrorDomain
- This enumeration details various high-level error types.
+ Describes various high-level error types:
\value WebEngineView::NoErrorDomain
\value WebEngineView::InternalErrorDomain
@@ -471,68 +532,42 @@
/*!
\qmlproperty enumeration WebEngineView::JavaScriptConsoleMessageLevel
- Indicates the severity of a JavaScript console message.
-
- \table
-
- \header
- \li Constant
- \li Description
-
- \row
- \li InfoMessageLevel
- \li Message is purely informative and should be safe to ignore.
-
- \row
- \li WarningMessageLevel
- \li Message indicates there might be a problem that may need attention.
-
- \row
- \li ErrorMessageLevel
- \li Message indicates there has been an error.
+ Indicates the severity of a JavaScript console message:
- \endtable
+ \value InfoMessageLevel
+ Message is purely informative and can safely be ignored.
+ \value WarningMessageLevel
+ Message indicates there might be a problem that may need attention.
+ \value ErrorMessageLevel
+ Message indicates there has been an error.
*/
/*!
\qmlproperty enumeration WebEngineView::LoadStatus
- Reflects a page's load status.
+ Reflects a page's load status:
- \table
-
- \header
- \li Constant
- \li Description
-
- \row
- \li LoadStartedStatus
- \li Page is currently loading.
-
- \row
- \li LoadSucceededStatus
- \li Page has successfully loaded, and is not currently loading.
-
- \row
- \li LoadFailedStatus
- \li Page has failed to load, and is not currently loading.
-
- \endtable
+ \value LoadStartedStatus
+ Page is currently loading.
+ \value LoadSucceededStatus
+ Page has successfully loaded, and is not currently loading.
+ \value LoadFailedStatus
+ Page has failed to load, and is not currently loading.
*/
/*!
\qmlproperty enumeration WebEngineView::NewViewDestination
- This enumeration details the format in which a new view request should be opened.
+ Describes how to open a new view:
\value WebEngineView::NewViewInWindow
- The page expects to be opened in a separate Window.
+ In a separate Window.
\value WebEngineView::NewViewInTab
- The page expects to be opened in a tab of the same window.
+ In a tab of the same window.
\value WebEngineView::NewViewInDialog
- The page expects to be opened in a Window without any tab, tool or URL bar.
+ In a Window without a tab bar, toolbar, or URL bar.
\value WebEngineView::NewViewInBackgroundTab
- The page expects to be opened in a tab of the same window, without hiding the currently visible WebEngineView.
+ In a tab of the same window, without hiding the currently visible web engine view.
\sa WebEngineNewViewRequest::destination
*/
@@ -540,7 +575,7 @@
/*!
\qmlproperty enumeration WebEngineView::FindFlags
- This enum describes the options available to the findText() function. The options
+ Describes the options available to the findText() function. The options
can be OR-ed together from the following list:
\value FindBackward Searches backwards instead of forwards.
@@ -551,14 +586,106 @@
*/
/*!
+ \qmlproperty enumeration WebEngineView::RenderProcessTerminationStatus
+ \since QtWebEngine 1.2
+
+ Describes the status with which the render process terminated:
+
+ \value NormalTerminationStatus
+ The render process terminated normally.
+ \value AbnormalTerminationStatus
+ The render process terminated with a non-zero exit status.
+ \value CrashedTerminationStatus
+ The render process crashed, for example because of a segmentation fault.
+ \value KilledTerminationStatus
+ The render process was killed, for example by \c SIGKILL or task manager kill.
+*/
+
+/*!
+ \qmlproperty enumeration WebEngineView::WebAction
+ \since QtWebEngine 1.2
+
+ Describes the types of action that can be performed on a web page:
+
+ \value NoWebAction
+ No action is triggered.
+ \value Back
+ Navigate back in the history of navigated links.
+ \value Forward
+ Navigate forward in the history of navigated links.
+ \value Stop
+ Stop loading the current page.
+ \value Reload
+ Reload the current page.
+ \value ReloadAndBypassCache
+ Reload the current page, but do not use any local cache.
+ \value Cut
+ Cut the content currently selected into the clipboard.
+ \value Copy
+ Copy the content currently selected into the clipboard.
+ \value Paste
+ Paste content from the clipboard.
+ \value Undo
+ Undo the last editing action.
+ \value Redo
+ Redo the last editing action.
+ \value SelectAll
+ Select all content.
+ \value PasteAndMatchStyle
+ Paste content from the clipboard with current style.
+ \value OpenLinkInThisWindow
+ Open the current link in the current window. (Added in Qt 5.6)
+ \value OpenLinkInNewWindow
+ Open the current link in a new window. (Added in Qt 5.6)
+ \value OpenLinkInNewTab
+ Open the current link in a new tab. (Added in Qt 5.6)
+ \value CopyLinkToClipboard
+ Copy the current link to the clipboard. (Added in Qt 5.6)
+ \value CopyImageToClipboard
+ Copy the clicked image to the clipboard. (Added in Qt 5.6)
+ \value CopyImageUrlToClipboard
+ Copy the clicked image's URL to the clipboard. (Added in Qt 5.6)
+ \value CopyMediaUrlToClipboard
+ Copy the hovered audio or video's URL to the clipboard. (Added in Qt 5.6)
+ \value ToggleMediaControls
+ Toggle between showing and hiding the controls for the hovered audio or video element.
+ (Added in Qt 5.6)
+ \value ToggleMediaLoop
+ Toggle whether the hovered audio or video should loop on completetion or not.
+ (Added in Qt 5.6)
+ \value ToggleMediaPlayPause
+ Toggle the play/pause state of the hovered audio or video element. (Added in Qt 5.6)
+ \value ToggleMediaMute
+ Mute or unmute the hovered audio or video element. (Added in Qt 5.6)
+ \value DownloadLinkToDisk
+ Download the current link to the disk. (Added in Qt 5.6)
+ \value DownloadImageToDisk
+ Download the highlighted image to the disk. (Added in Qt 5.6)
+ \value DownloadMediaToDisk
+ Download the hovered audio or video to the disk. (Added in Qt 5.6)
+ \value InspectElement
+ Trigger any attached Web Inspector to inspect the highlighed element.
+ (Added in Qt 5.6)
+ \value ExitFullScreen
+ Exit the fullscreen mode. (Added in Qt 5.6)
+
+ \omitvalue WebActionCount
+*/
+
+/*!
\qmlproperty enumeration WebEngineView::Feature
- This enum describes the platform feature access categories that the user may be asked to grant or deny access to.
+ Describes the platform feature access categories that the user may be asked to grant or deny
+ access to:
- \value Geolocation Access to location hardware or service
- \value MediaAudioCapture Audio capture devices such a microphones
- \value MediaVideoCapture Video devices, e.g. cameras
- \value MediaAudioVideoCapture Both Audio and Video capture devices.
+ \value Geolocation
+ Location hardware or service.
+ \value MediaAudioCapture
+ Audio capture devices, such as microphones.
+ \value MediaVideoCapture
+ Video devices, such as cameras.
+ \value MediaAudioVideoCapture
+ Both audio and video capture devices.
\sa featurePermissionRequested(), grantFeaturePermission()
*/
@@ -569,7 +696,7 @@
\inqmlmodule QtWebEngine 1.1
\since QtWebEngine 1.1
- \brief A utility class for the WebEngineView::fullScreenRequested() signal.
+ \brief A utility type for the WebEngineView::fullScreenRequested() signal.
\sa WebEngineView::fullScreenRequested()
*/
@@ -591,7 +718,7 @@
Call this method to accept the fullscreen request. It sets the WebEngineView::isFullScreen
property to be equal to toggleOn.
- \code
+ \qml
ApplicationWindow {
id: window
WebEngineView {
@@ -604,7 +731,7 @@
}
}
}
- \endcode
+ \endqml
\sa toggleOn
*/
diff --git a/src/webengine/plugin/plugins.qmltypes b/src/webengine/plugin/plugins.qmltypes
index 9dcded7b0..1e577bf51 100644
--- a/src/webengine/plugin/plugins.qmltypes
+++ b/src/webengine/plugin/plugins.qmltypes
@@ -4,7 +4,7 @@ import QtQuick.tooling 1.2
// It is used for QML tooling purposes only.
//
// This file was auto-generated by:
-// 'qmlplugindump -nonrelocatable QtWebEngine 1.1'
+// 'qmlplugindump -nonrelocatable QtWebEngine 1.2'
Module {
dependencies: []
@@ -571,8 +571,11 @@ Module {
Component {
name: "QQuickWebEngineProfile"
prototype: "QObject"
- exports: ["QtWebEngine/WebEngineProfile 1.1"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtWebEngine/WebEngineProfile 1.1",
+ "QtWebEngine/WebEngineProfile 1.2"
+ ]
+ exportMetaObjectRevisions: [0, 1]
Enum {
name: "HttpCacheType"
values: {
@@ -594,8 +597,10 @@ Module {
Property { name: "cachePath"; type: "string" }
Property { name: "httpUserAgent"; type: "string" }
Property { name: "httpCacheType"; type: "HttpCacheType" }
+ Property { name: "httpAcceptLanguage"; type: "string" }
Property { name: "persistentCookiesPolicy"; type: "PersistentCookiesPolicy" }
Property { name: "httpCacheMaximumSize"; type: "int" }
+ Signal { name: "httpAcceptLanguageChanged"; revision: 1 }
Signal {
name: "downloadRequested"
Parameter { name: "download"; type: "QQuickWebEngineDownloadItem"; isPointer: true }
@@ -604,6 +609,11 @@ Module {
name: "downloadFinished"
Parameter { name: "download"; type: "QQuickWebEngineDownloadItem"; isPointer: true }
}
+ Method {
+ name: "setCookieStoreClient"
+ revision: 1
+ Parameter { name: "client"; type: "QWebEngineCookieStoreClient"; isPointer: true }
+ }
}
Component {
name: "QQuickWebEngineScript"
@@ -685,9 +695,12 @@ Module {
Component {
name: "QQuickWebEngineSettings"
prototype: "QObject"
- exports: ["QtWebEngine/WebEngineSettings 1.1"]
+ exports: [
+ "QtWebEngine/WebEngineSettings 1.1",
+ "QtWebEngine/WebEngineSettings 1.2"
+ ]
isCreatable: false
- exportMetaObjectRevisions: [0]
+ exportMetaObjectRevisions: [0, 1]
Property { name: "autoLoadImages"; type: "bool" }
Property { name: "javascriptEnabled"; type: "bool" }
Property { name: "javascriptCanOpenWindows"; type: "bool" }
@@ -699,7 +712,10 @@ Module {
Property { name: "localContentCanAccessFileUrls"; type: "bool" }
Property { name: "hyperlinkAuditingEnabled"; type: "bool" }
Property { name: "errorPageEnabled"; type: "bool" }
+ Property { name: "pluginsEnabled"; type: "bool" }
+ Property { name: "fullScreenSupportEnabled"; revision: 1; type: "bool" }
Property { name: "defaultTextEncoding"; type: "string" }
+ Signal { name: "fullScreenSupportEnabledChanged"; revision: 1 }
}
Component {
name: "QQuickWebEngineSingleton"
@@ -723,9 +739,10 @@ Module {
prototype: "QQuickItem"
exports: [
"QtWebEngine/WebEngineView 1.0",
- "QtWebEngine/WebEngineView 1.1"
+ "QtWebEngine/WebEngineView 1.1",
+ "QtWebEngine/WebEngineView 1.2"
]
- exportMetaObjectRevisions: [0, 1]
+ exportMetaObjectRevisions: [0, 1, 2]
Enum {
name: "NavigationRequestAction"
values: {
@@ -784,6 +801,41 @@ Module {
}
}
Enum {
+ name: "WebAction"
+ values: {
+ "NoWebAction": -1,
+ "Back": 0,
+ "Forward": 1,
+ "Stop": 2,
+ "Reload": 3,
+ "Cut": 4,
+ "Copy": 5,
+ "Paste": 6,
+ "Undo": 7,
+ "Redo": 8,
+ "SelectAll": 9,
+ "ReloadAndBypassCache": 10,
+ "PasteAndMatchStyle": 11,
+ "OpenLinkInThisWindow": 12,
+ "OpenLinkInNewWindow": 13,
+ "OpenLinkInNewTab": 14,
+ "CopyLinkToClipboard": 15,
+ "DownloadLinkToDisk": 16,
+ "CopyImageToClipboard": 17,
+ "CopyImageUrlToClipboard": 18,
+ "DownloadImageToDisk": 19,
+ "CopyMediaUrlToClipboard": 20,
+ "ToggleMediaControls": 21,
+ "ToggleMediaLoop": 22,
+ "ToggleMediaPlayPause": 23,
+ "ToggleMediaMute": 24,
+ "DownloadMediaToDisk": 25,
+ "InspectElement": 26,
+ "ExitFullScreen": 27,
+ "WebActionCount": 28
+ }
+ }
+ Enum {
name: "JavaScriptConsoleMessageLevel"
values: {
"InfoMessageLevel": 0,
@@ -792,6 +844,15 @@ Module {
}
}
Enum {
+ name: "RenderProcessTerminationStatus"
+ values: {
+ "NormalTerminationStatus": 0,
+ "AbnormalTerminationStatus": 1,
+ "CrashedTerminationStatus": 2,
+ "KilledTerminationStatus": 3
+ }
+ }
+ Enum {
name: "FindFlags"
values: {
"FindBackward": 1,
@@ -830,6 +891,8 @@ Module {
isList: true
isReadonly: true
}
+ Property { name: "activeFocusOnPress"; revision: 2; type: "bool" }
+ Property { name: "backgroundColor"; revision: 2; type: "QColor" }
Signal {
name: "loadingChanged"
Parameter { name: "loadRequest"; type: "QQuickWebEngineLoadRequest"; isPointer: true }
@@ -878,6 +941,18 @@ Module {
}
Signal { name: "profileChanged"; revision: 1 }
Signal { name: "webChannelChanged"; revision: 1 }
+ Signal {
+ name: "activeFocusOnPressChanged"
+ revision: 2
+ Parameter { type: "bool" }
+ }
+ Signal { name: "backgroundColorChanged"; revision: 2 }
+ Signal {
+ name: "renderProcessTerminated"
+ revision: 2
+ Parameter { name: "terminationStatus"; type: "RenderProcessTerminationStatus" }
+ Parameter { name: "exitCode"; type: "int" }
+ }
Method {
name: "runJavaScript"
Parameter { type: "string" }
@@ -932,5 +1007,15 @@ Module {
Parameter { type: "Feature" }
Parameter { name: "granted"; type: "bool" }
}
+ Method {
+ name: "setActiveFocusOnPress"
+ revision: 2
+ Parameter { name: "arg"; type: "bool" }
+ }
+ Method {
+ name: "triggerWebAction"
+ revision: 2
+ Parameter { name: "action"; type: "WebAction" }
+ }
}
}
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp
index 5a5c261b4..4cc64c8c7 100644
--- a/src/webengine/ui_delegates_manager.cpp
+++ b/src/webengine/ui_delegates_manager.cpp
@@ -259,6 +259,10 @@ void UIDelegatesManager::showDialog(QSharedPointer<JavaScriptDialogController> d
dialogComponentType = PromptDialog;
title = QCoreApplication::translate("UIDelegatesManager", "Javascript Prompt - %1").arg(m_view->url().toString());
break;
+ case WebContentsAdapterClient::UnloadDialog:
+ dialogComponentType = ConfirmDialog;
+ title = QCoreApplication::translate("UIDelegatesManager", "Are you sure you want to leave this page?");
+ break;
case WebContentsAdapterClient::InternalAuthorizationDialog:
dialogComponentType = ConfirmDialog;
title = dialogController->title();