summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp14
-rw-r--r--src/webenginewidgets/api/qwebenginepage.h1
-rw-r--r--src/webenginewidgets/api/qwebenginepage_p.h1
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp26
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.h2
-rw-r--r--src/webenginewidgets/api/qwebengineprofile_p.h2
-rw-r--r--src/webenginewidgets/api/qwebengineview.cpp8
-rw-r--r--src/webenginewidgets/doc/qtwebenginewidgets.qdocconf43
-rw-r--r--src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc5
-rw-r--r--src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc6
-rw-r--r--src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc24
-rw-r--r--src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc105
-rw-r--r--src/webenginewidgets/webenginewidgets.pro2
13 files changed, 113 insertions, 126 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index 61e37decb..e13b5d319 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -224,6 +224,11 @@ void QWebEnginePagePrivate::close()
Q_EMIT q->windowCloseRequested();
}
+void QWebEnginePagePrivate::windowCloseRejected()
+{
+ // Do nothing for now.
+}
+
void QWebEnginePagePrivate::didRunJavaScript(quint64 requestId, const QVariant& result)
{
m_callbacks.invoke(requestId, result);
@@ -651,6 +656,9 @@ QAction *QWebEnginePage::action(WebAction action) const
case ExitFullScreen:
text = tr("Exit Full Screen Mode");
break;
+ case RequestClose:
+ text = tr("Close Page");
+ break;
case Unselect:
text = tr("Unselect");
break;
@@ -827,6 +835,9 @@ void QWebEnginePage::triggerAction(WebAction action, bool)
case ExitFullScreen:
d->adapter->exitFullScreen();
break;
+ case RequestClose:
+ d->adapter->requestClose();
+ break;
default:
Q_UNREACHABLE();
}
@@ -922,6 +933,9 @@ void QWebEnginePagePrivate::javascriptDialog(QSharedPointer<JavaScriptDialogCont
if (accepted)
controller->textProvided(promptResult);
break;
+ case UnloadDialog:
+ accepted = (QMessageBox::information(view, QCoreApplication::translate("QWebEnginePage", "Are you sure you want to leave this page?"), controller->message(), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes);
+ break;
case InternalAuthorizationDialog:
accepted = (QMessageBox::question(view, controller->title(), controller->message(), QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes);
break;
diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h
index a72991778..a5930b396 100644
--- a/src/webenginewidgets/api/qwebenginepage.h
+++ b/src/webenginewidgets/api/qwebenginepage.h
@@ -110,6 +110,7 @@ public:
InspectElement,
ExitFullScreen,
+ RequestClose,
Unselect,
WebActionCount
diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h
index d05f76b1a..0ddca3874 100644
--- a/src/webenginewidgets/api/qwebenginepage_p.h
+++ b/src/webenginewidgets/api/qwebenginepage_p.h
@@ -95,6 +95,7 @@ public:
virtual void unhandledKeyEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
virtual void adoptNewWindow(QtWebEngineCore::WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &initialGeometry) Q_DECL_OVERRIDE;
virtual void close() Q_DECL_OVERRIDE;
+ virtual void windowCloseRejected() Q_DECL_OVERRIDE;
virtual bool contextMenuRequested(const QtWebEngineCore::WebEngineContextMenuData &data) Q_DECL_OVERRIDE;
virtual void navigationRequested(int navigationType, const QUrl &url, int &navigationRequestAction, bool isMainFrame) Q_DECL_OVERRIDE;
virtual void requestFullScreen(bool) Q_DECL_OVERRIDE;
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index 323659827..b98aa3a61 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -42,7 +42,6 @@
#include "qwebenginepage.h"
#include "qwebengineprofile_p.h"
#include "qwebenginesettings.h"
-#include "qwebengineurlschemehandler_p.h"
#include "qwebenginescriptcollection_p.h"
#include "browser_context_adapter.h"
@@ -545,8 +544,8 @@ QWebEngineSettings *QWebEngineProfile::settings() const
const QWebEngineUrlSchemeHandler *QWebEngineProfile::urlSchemeHandler(const QByteArray &scheme) const
{
const Q_D(QWebEngineProfile);
- if (d->m_urlSchemeHandlers.contains(scheme))
- return d->m_urlSchemeHandlers.value(scheme);
+ if (d->browserContext()->customUrlSchemeHandlers().contains(scheme))
+ return d->browserContext()->customUrlSchemeHandlers().value(scheme);
return 0;
}
@@ -571,18 +570,17 @@ void QWebEngineProfile::installUrlSchemeHandler(QWebEngineUrlSchemeHandler *hand
Q_ASSERT(handler);
QByteArray scheme = handler->scheme();
if (checkInternalScheme(scheme)) {
- qWarning() << "Can not install a URL scheme handler overriding internal scheme: " << scheme;
+ qWarning("Can not install a URL scheme handler overriding internal scheme: %s", scheme.constData());
return;
}
- if (d->m_urlSchemeHandlers.contains(scheme)) {
- qWarning() << "URL scheme handler already installed for the scheme: " << scheme;
+ if (d->browserContext()->customUrlSchemeHandlers().contains(scheme)) {
+ qWarning("URL scheme handler already installed for the scheme: %s", scheme.constData());
return;
}
- d->m_urlSchemeHandlers.insert(scheme, handler);
- d->browserContext()->customUrlSchemeHandlers().append(handler->d_func());
+ d->browserContext()->customUrlSchemeHandlers().insert(scheme, handler);
d->browserContext()->updateCustomUrlSchemeHandlers();
- connect(handler, SIGNAL(destroyed(QObject*)), this, SLOT(destroyedUrlSchemeHandler(QObject*)));
+ connect(handler, SIGNAL(destroyed(QWebEngineUrlSchemeHandler*)), this, SLOT(destroyedUrlSchemeHandler(QWebEngineUrlSchemeHandler*)));
}
/*!
@@ -596,11 +594,10 @@ void QWebEngineProfile::removeUrlSchemeHandler(QWebEngineUrlSchemeHandler *handl
Q_ASSERT(handler);
if (!handler)
return;
- int count = d->m_urlSchemeHandlers.remove(handler->scheme());
+ int count = d->browserContext()->customUrlSchemeHandlers().remove(handler->scheme());
if (!count)
return;
- disconnect(handler, SIGNAL(destroyed(QObject*)), this, SLOT(destroyedUrlSchemeHandler(QObject*)));
- d->browserContext()->removeCustomUrlSchemeHandler(handler->d_func());
+ disconnect(handler, SIGNAL(destroyed(QWebEngineUrlSchemeHandler*)), this, SLOT(destroyedUrlSchemeHandler(QWebEngineUrlSchemeHandler*)));
d->browserContext()->updateCustomUrlSchemeHandlers();
}
@@ -612,14 +609,13 @@ void QWebEngineProfile::removeUrlSchemeHandler(QWebEngineUrlSchemeHandler *handl
void QWebEngineProfile::clearUrlSchemeHandlers()
{
Q_D(QWebEngineProfile);
- d->m_urlSchemeHandlers.clear();
d->browserContext()->customUrlSchemeHandlers().clear();
d->browserContext()->updateCustomUrlSchemeHandlers();
}
-void QWebEngineProfile::destroyedUrlSchemeHandler(QObject *obj)
+void QWebEngineProfile::destroyedUrlSchemeHandler(QWebEngineUrlSchemeHandler *obj)
{
- removeUrlSchemeHandler(qobject_cast<QWebEngineUrlSchemeHandler*>(obj));
+ removeUrlSchemeHandler(obj);
}
QT_END_NAMESPACE
diff --git a/src/webenginewidgets/api/qwebengineprofile.h b/src/webenginewidgets/api/qwebengineprofile.h
index 5532f12ee..82946a223 100644
--- a/src/webenginewidgets/api/qwebengineprofile.h
+++ b/src/webenginewidgets/api/qwebengineprofile.h
@@ -121,7 +121,7 @@ Q_SIGNALS:
void downloadRequested(QWebEngineDownloadItem *download);
private Q_SLOTS:
- void destroyedUrlSchemeHandler(QObject *obj);
+ void destroyedUrlSchemeHandler(QWebEngineUrlSchemeHandler *obj);
private:
Q_DISABLE_COPY(QWebEngineProfile)
diff --git a/src/webenginewidgets/api/qwebengineprofile_p.h b/src/webenginewidgets/api/qwebengineprofile_p.h
index 8ba64c438..7dcc76598 100644
--- a/src/webenginewidgets/api/qwebengineprofile_p.h
+++ b/src/webenginewidgets/api/qwebengineprofile_p.h
@@ -50,7 +50,6 @@
#include "browser_context_adapter_client.h"
#include "qwebengineprofile.h"
-#include "qwebengineurlschemehandler_p.h"
#include "qwebenginescriptcollection.h"
#include <QMap>
#include <QPointer>
@@ -85,7 +84,6 @@ private:
QScopedPointer<QWebEngineScriptCollection> m_scriptCollection;
QExplicitlySharedDataPointer<QtWebEngineCore::BrowserContextAdapter> m_browserContextRef;
QMap<quint32, QPointer<QWebEngineDownloadItem> > m_ongoingDownloads;
- QMap<QByteArray, QWebEngineUrlSchemeHandler *> m_urlSchemeHandlers;
};
QT_END_NAMESPACE
diff --git a/src/webenginewidgets/api/qwebengineview.cpp b/src/webenginewidgets/api/qwebengineview.cpp
index ddd1e4cbf..9baa8e34a 100644
--- a/src/webenginewidgets/api/qwebengineview.cpp
+++ b/src/webenginewidgets/api/qwebengineview.cpp
@@ -108,6 +108,14 @@ QWebEngineViewPrivate::QWebEngineViewPrivate()
#endif // QT_NO_ACCESSIBILITY
}
+/*!
+ \fn QWebEngineView::renderProcessTerminated(QWebEnginePage::RenderProcessTerminationStatus terminationStatus, int exitCode)
+
+ 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.
+*/
+
QWebEngineView::QWebEngineView(QWidget *parent)
: QWidget(parent)
, d_ptr(new QWebEngineViewPrivate)
diff --git a/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf b/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf
deleted file mode 100644
index 7b48b7a14..000000000
--- a/src/webenginewidgets/doc/qtwebenginewidgets.qdocconf
+++ /dev/null
@@ -1,43 +0,0 @@
-include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf)
-
-project = QtWebEngineWidgets
-description = Qt WebEngineWidgets Reference Documentation
-version = $QT_VERSION
-
-examplesinstallpath = webenginewidgets
-
-qhp.projects = QtWebEngineWidgets
-
-qhp.QtWebEngineWidgets.file = qtwebenginewidgets.qhp
-qhp.QtWebEngineWidgets.namespace = org.qt-project.qtwebenginewidgets.$QT_VERSION_TAG
-qhp.QtWebEngineWidgets.virtualFolder = qtwebenginewidgets
-qhp.QtWebEngineWidgets.indexTitle = Qt WebEngine Widgets
-qhp.QtWebEngineWidgets.indexRoot =
-
-qhp.QtWebEngineWidgets.filterAttributes = qtwebenginewidgets $QT_VERSION qtrefdoc
-qhp.QtWebEngineWidgets.customFilters.Qt.name = QtWebEngineWidgets $QT_VERSION
-qhp.QtWebEngineWidgets.customFilters.Qt.filterAttributes = qtwebenginewidgets $QT_VERSION
-qhp.QtWebEngineWidgets.subprojects = classes examples
-qhp.QtWebEngineWidgets.subprojects.classes.title = C++ Classes
-qhp.QtWebEngineWidgets.subprojects.classes.indexTitle = Qt WebEngine Widgets C++ Classes
-qhp.QtWebEngineWidgets.subprojects.classes.selectors = class fake:headerfile
-qhp.QtWebEngineWidgets.subprojects.classes.sortPages = true
-qhp.QtWebEngineWidgets.subprojects.examples.title = Examples
-qhp.QtWebEngineWidgets.subprojects.examples.indexTitle = Qt WebEngine Widgets Examples
-qhp.QtWebEngineWidgets.subprojects.examples.selectors = fake:example
-qhp.QtWebEngineWidgets.subprojects.examples.sortPages = true
-
-tagfile = ../../../doc/qtwebenginewidgets/qtwebenginewidgets.tags
-
-depends += qtwebengine qtcore qtnetwork qtgui qtwidgets qtwebkit qtdoc qtwebchannel
-
-headerdirs += ../api
-sourcedirs += ../api src
-
-exampledirs += ../../../examples/webenginewidgets \
- snippets
-
-navigation.landingpage = "Qt WebEngine Widgets"
-navigation.cppclassespage = "Qt WebEngine Widgets C++ Classes"
-
-Cpp.ignoretokens += QWEBENGINEWIDGETS_EXPORT
diff --git a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
index 6373389f3..a9ef6ad8c 100644
--- a/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebenginewidgets-module.qdoc
@@ -30,7 +30,12 @@
\title Qt WebEngine Widgets C++ Classes
\brief Provides a web browser engine as well as C++ classes to render and
interact with web content
+ \ingroup modules
\ingroup qtwebengine-modules
+ \qtvariable webenginewidgets
+
+ The Qt WebEngineWidgets module provides a web browser engine as well as C++ classes to render
+ and interact with web content.
To include the definitions of the module's classes, use the
following directive:
diff --git a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
index 174f59d83..927b08cb5 100644
--- a/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
+++ b/src/webenginewidgets/doc/src/qtwebkitportingguide.qdoc
@@ -31,8 +31,10 @@
\brief This guide gives an overview of the differences between the Qt WebKit
and Qt WebEngine APIs in applications.
- This provides rough steps to follow when porting an application using
- Qt WebKit's QWebView API to use Qt WebEngine's QWebEngineView.
+ This guide provides rough steps to follow when porting an application that uses the
+ \l{http://doc.qt.io/archives/qt-5.3/qtwebkit-index.html}{Qt WebKit}
+ \l{http://doc.qt.io/archives/qt-5.3/qml-qtwebkit-webview.html}{QWebView API} to use the
+ \l{Qt WebEngine} QWebEngineView.
\section1 Class Names
diff --git a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
index 794cb56d2..b7b3bf022 100644
--- a/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebenginepage_lgpl.qdoc
@@ -119,6 +119,9 @@
\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)
+ \value RequestClose Request to close the web page. If defined, the \c{window.onbeforeunload}
+ handler is run, and the user can confirm or reject to close the page. If the close
+ request is confirmed, \c windowCloseRequested is emitted. (Added in Qt 5.6)
\omitvalue WebActionCount
@@ -264,11 +267,11 @@
/*!
\fn bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame)
+ \since 5.5
This function is called upon receiving a request to navigate to the specified \a url by means of
the specified navigation type \a type. \a isMainFrame indicates whether the request corresponds
to the main frame or a sub frame. If the function returns \c true, the navigation request is
- accepted and Chromium continues to load the page. Otherwise, the request is ignored. The default
- implementation accepts the navigation request.
+ accepted and \c url is loaded. The default implementation accepts all navigation requests.
*/
@@ -482,6 +485,8 @@
This signal is emitted whenever the page requests the web browser window to be closed,
for example through the JavaScript \c{window.close()} call.
+
+ \sa QWebEnginePage::RequestClose
*/
/*!
@@ -596,16 +601,27 @@
/*!
\fn void QWebEnginePage::runJavaScript(const QString& scriptSource)
- Runs the JavaScript code contained in \a scriptSource.
+ \overload runJavaScript()
+
+ This convenience function runs the JavaScript code contained in \a scriptSource.
*/
/*!
\fn void QWebEnginePage::runJavaScript(const QString& scriptSource, FunctorOrLambda resultCallback)
+
Runs the JavaScript code contained in \a scriptSource.
+ The script will run in the same \e world as other scripts that are part of the loaded site.
+
When the script has been executed, \a resultCallback is called with the result of the last executed statement.
+ \a resultCallback can be any of a function pointer, a functor or a lambda, and it is expected to take a
+ QVariant parameter. For example:
+
+ \code
+ page.runJavaScript("document.title", [](const QVariant &v) { qDebug() << v.toString(); });
+ \endcode
- \note \a resultCallback can be any of a function pointer, a functor or a lambda, and it is expected to take a QVariant parameter.
+ See scripts() for an alternative API to inject scripts.
*/
/*!
diff --git a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
index 76878e077..9d03527e1 100644
--- a/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
+++ b/src/webenginewidgets/doc/src/qwebengineview_lgpl.qdoc
@@ -33,57 +33,48 @@
\inmodule QtWebEngineWidgets
- QWebEngineView is the main widget component of the Qt WebEngine web browsing module.
+ A \e {web view} is the main widget component of the Qt WebEngine web browsing module.
It can be used in various applications to display web content live from the
Internet.
- A web site can be loaded onto QWebEngineView with the load() function. Like all
+ A \e {web site} can be loaded to a web view with the load() function. Like all
Qt widgets, the show() function must be invoked in order to display
- QWebEngineView. The snippet below illustrates this:
+ the web view. The snippet below illustrates this:
\snippet simple/main.cpp Using QWebEngineView
- Alternatively, setUrl() can also be used to load a web site. If you have
+ Alternatively, setUrl() can be used to load a web site. If you have
the HTML content readily available, you can use setHtml() instead.
- The loadStarted() signal is emitted when the view begins loading. The
- loadProgress() signal, on the other hand, is emitted whenever an element of
- the web view completes loading, such as an embedded image, a script, etc.
- Finally, the loadFinished() signal is emitted when the view has loaded
- completely. It's argument - either \c true or \c false - indicates
- load success or failure.
+ The loadStarted() signal is emitted when the view begins loading and the loadProgress()
+ signal is emitted whenever an element of the web view completes loading, such as an embedded
+ image or a script. The loadFinished() signal is emitted when the view has been loaded
+ completely. Its argument, either \c true or \c false, indicates whether loading was
+ successful or failed.
- The page() function returns a pointer to the web page object. See
- \l{Elements of QWebEngineView} for an explanation of how the web page
- is related to the view.
+ The page() function returns a pointer to a \e {web page} object. A QWebEngineView contains a
+ QWebEnginePage, which in turn allows access to the QWebEngineHistory in the page's context.
The title of an HTML document can be accessed with the title() property.
- Additionally, a web site may also specify an icon, which can be accessed
+ Additionally, a web site may specify an icon, which can be accessed
using the iconUrl() property. If the title or the icon changes, the corresponding
titleChanged() and iconUrlChanged() signals will be emitted. The
- textSizeMultiplier() property can be used to change the overall size of
- the text displayed in the web view.
+ zoomFactor() property can be used to change the overall size of the contents of the web view.
If you require a custom context menu, you can implement it by reimplementing
\l{QWidget::}{contextMenuEvent()} and populating your QMenu with the actions
- obtained from pageAction(). More functionality such as reloading the view,
- copying selected text to the clipboard, or pasting into the view, is also
+ obtained from pageAction(). Additional functionality, such as reloading the view,
+ copying selected text to the clipboard, or pasting into the view, is
encapsulated within the QAction objects returned by pageAction(). These
actions can be programmatically triggered using triggerPageAction().
Alternatively, the actions can be added to a toolbar or a menu directly.
- QWebEngineView maintains the state of the returned actions but allows
+ The web view maintains the state of the returned actions but allows
modification of action properties such as \l{QAction::}{text} or
\l{QAction::}{icon}.
If you want to provide support for web sites that allow the user to open
new windows, such as pop-up windows, you can subclass QWebEngineView and
reimplement the createWindow() function.
-
- \section1 Elements of QWebEngineView
-
- QWebEngineView contains a QWebEnginePage, which in turn allows access to the
- QWebEngineHistory in the page's context.
-
*/
// FIXME: reintroduce the following when we have proper names for the examples.
// \sa {WebEngine Tab Browser Example}, {WebEngine Fancy Browser Example}
@@ -91,7 +82,7 @@
/*!
\fn QWebEngineView::QWebEngineView(QWidget *parent)
- Constructs an empty QWebEngineView with parent \a parent.
+ Constructs an empty web view with the parent \a parent.
\sa load()
*/
@@ -123,29 +114,29 @@
\fn void QWebEngineView::load(const QUrl &url)
Loads the specified \a url and displays it.
- \note The view remains the same until enough data has arrived to display the new \a url.
+ \note The view remains the same until enough data has arrived to display the new URL.
\sa setUrl(), url(), urlChanged(), QUrl::fromUserInput()
*/
/*!
\fn void QWebEngineView::setHtml(const QString &html, const QUrl &baseUrl)
- Sets the content of the web view to the specified \a html.
+ Sets the content of the web view to the specified \a html content.
- External objects such as stylesheets or images referenced in the HTML
- document are located relative to \a baseUrl.
+ External objects, such as stylesheets or images referenced in the HTML
+ document, are located relative to \a baseUrl.
- The \a html is loaded immediately; external objects are loaded asynchronously.
+ The HTML document is loaded immediately, whereas external objects are loaded asynchronously.
- When using this method, Qt WebEngine assumes that external resources such as
- JavaScript programs or style sheets are encoded in UTF-8 unless otherwise
+ When using this method, Qt WebEngine assumes that external resources, such as
+ JavaScript programs or style sheets, are encoded in UTF-8 unless otherwise
specified. For example, the encoding of an external script can be specified
- through the charset attribute of the HTML script tag. Alternatively, the
- encoding can also be specified by the web server.
+ through the \c charset attribute of the HTML script tag. Alternatively, the
+ encoding can be specified by the web server.
This is a convenience function equivalent to setContent(html, "text/html", baseUrl).
- \warning This function works only for HTML, for other mime types (i.e. XHTML, SVG)
+ \warning This function works only for HTML. For other MIME types (such as XHTML or SVG),
setContent() should be used instead.
\sa load(), setContent(), QWebEnginePage::toHtml(), QWebEnginePage::setContent()
@@ -154,12 +145,12 @@
/*!
\fn void QWebEngineView::setContent(const QByteArray &data, const QString &mimeType, const QUrl &baseUrl)
Sets the content of the web view to the specified content \a data. If the \a mimeType argument
- is empty it is currently assumed that the content is HTML but in future versions we may introduce
- auto-detection.
+ is empty, it is currently assumed that the content is HTML but in future versions we may
+ introduce auto-detection.
External objects referenced in the content are located relative to \a baseUrl.
- The \a data is loaded immediately; external objects are loaded asynchronously.
+ The data is loaded immediately; external objects are loaded asynchronously.
\sa load(), setHtml(), QWebEnginePage::toHtml()
*/
@@ -168,7 +159,7 @@
\fn QWebEngineHistory *QWebEngineView::history() const
Returns a pointer to the view's history of navigated web pages.
- It is equivalent to
+ It is equivalent to:
\snippet qtwebengine_qwebengineview_snippet.cpp 0
*/
@@ -184,7 +175,7 @@
/*!
\property QWebEngineView::url
- \brief the url of the web page currently viewed
+ \brief the URL of the web page currently viewed
Setting this property clears the view and loads the URL.
@@ -195,7 +186,7 @@
/*!
\property QWebEngineView::iconUrl
- \brief the url of the icon associated with the web page currently viewed
+ \brief the URL of the icon associated with the web page currently viewed
\sa iconUrlChanged()
*/
@@ -204,7 +195,7 @@
\property QWebEngineView::hasSelection
\brief whether this page contains selected content or not.
- By default, this property is false.
+ By default, this property is \c false.
\sa selectionChanged()
*/
@@ -225,7 +216,7 @@
/*!
\fn void QWebEngineView::triggerPageAction(QWebEnginePage::WebAction action, bool checked)
- Triggers the specified \a action. If it is a checkable action the specified
+ Triggers the specified \a action. If it is a checkable action, the specified
\a checked state is assumed.
The following example triggers the copy action and therefore copies any
@@ -256,8 +247,8 @@
To clear the selection, just pass an empty string.
- The \a resultCallback must take a boolean parameter. It will be called with a value of true if the \a subString
- was found; otherwise the callback value will be false.
+ \a resultCallback must take a boolean parameter. It will be called with a value of \c true
+ if \a subString was found; otherwise the callback value will be \c false.
\sa selectedText(), selectionChanged()
*/
@@ -266,7 +257,7 @@
\fn void QWebEngineView::stop()
Convenience slot that stops loading the document.
- It is equivalent to
+ It is equivalent to:
\snippet qtwebengine_qwebengineview_snippet.cpp 3
@@ -278,7 +269,7 @@
Convenience slot that loads the previous document in the list of documents
built by navigating links. Does nothing if there is no previous document.
- It is equivalent to
+ It is equivalent to:
\snippet qtwebengine_qwebengineview_snippet.cpp 4
@@ -290,7 +281,7 @@
Convenience slot that loads the next document in the list of documents
built by navigating links. Does nothing if there is no next document.
- It is equivalent to
+ It is equivalent to:
\snippet qtwebengine_qwebengineview_snippet.cpp 5
@@ -306,11 +297,11 @@
/*!
\fn QWebEngineView *QWebEngineView::createWindow(QWebEnginePage::WebWindowType type)
- This function is called from the createWindow() method of the associated QWebEnginePage,
- each time the page wants to create a new window of the given \a type. This might
- be the result, for example, of a JavaScript request to open a document in a new window.
+ This function is called from the \l{QWebEnginePage::}{createWindow()} method of the associated
+ QWebEnginePage each time the page wants to create a new window of the given \a type. For
+ example, when a JavaScript request to open a document in a new window is issued.
- \note If the createWindow() method of the associated page is reimplemented, this
+ \note If the \c createWindow() method of the associated page is reimplemented, this
method is not called, unless explicitly done so in the reimplementation.
\sa QWebEnginePage::createWindow()
@@ -351,8 +342,8 @@
/*!
\fn void QWebEngineView::loadFinished(bool ok)
- This signal is emitted when a load of the page is finished.
- \a ok will indicate whether the load was successful or any error occurred.
+ This signal is emitted when a load of the page has finished.
+ \a ok will indicate whether the load was successful or an error occurred.
\sa loadStarted()
*/
@@ -382,9 +373,9 @@
/*!
\fn QWebEngineSettings *QWebEngineView::settings() const
- Returns a pointer to the view/page specific settings object.
+ Returns a pointer to the view or page specific settings object.
- It is equivalent to
+ It is equivalent to:
\snippet qtwebengine_qwebengineview_snippet.cpp 6
diff --git a/src/webenginewidgets/webenginewidgets.pro b/src/webenginewidgets/webenginewidgets.pro
index c32185563..17a0a3dbb 100644
--- a/src/webenginewidgets/webenginewidgets.pro
+++ b/src/webenginewidgets/webenginewidgets.pro
@@ -6,8 +6,6 @@ DEFINES += QT_BUILD_WEBENGINEWIDGETS_LIB
QT += webengine webenginecore widgets network quick
QT_PRIVATE += quick-private gui-private core-private
-QMAKE_DOCS = $$PWD/doc/qtwebenginewidgets.qdocconf
-
INCLUDEPATH += $$PWD api ../core ../core/api ../webengine/api
SOURCES = \