From ca3356ba65c78b5d9fc16be8ad3199b60886e102 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 24 Aug 2015 17:14:15 +0200 Subject: Doc: clean up QWebEngineSettings docs ... and the corresponding QQuickWebEngineSettings docs - Add missing documentation - Remove references to obsolete classes - Edit for grammar and style Change-Id: I368fff274609941d6435ddf3343b81bca6013945 Reviewed-by: Joerg Bornemann --- src/webengine/api/qquickwebenginesettings.cpp | 65 +++++++++++++-------------- 1 file changed, 31 insertions(+), 34 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp index 8a88bac68..248713543 100644 --- a/src/webengine/api/qquickwebenginesettings.cpp +++ b/src/webengine/api/qquickwebenginesettings.cpp @@ -56,8 +56,8 @@ QQuickWebEngineSettings::QQuickWebEngineSettings(QQuickWebEngineSettings *parent \since QtWebEngine 1.1 \brief WebEngineSettings allows configuration of browser properties and attributes. - WebEngineSettings allows configuration of browser properties and generic attributes like for example - JavaScript, focus behavior and access to remote content. + 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. @@ -70,9 +70,9 @@ QQuickWebEngineSettings::~QQuickWebEngineSettings() /*! \qmlproperty bool WebEngineSettings::autoLoadImages - Specifies whether images are automatically loaded in web pages. + Automatically loads images on web pages. - This is enabled by default. + Enabled by default. */ bool QQuickWebEngineSettings::autoLoadImages() const { @@ -82,9 +82,9 @@ bool QQuickWebEngineSettings::autoLoadImages() const /*! \qmlproperty bool WebEngineSettings::javascriptEnabled - Enables or disables the running of JavaScript programs. + Enables the running of JavaScript programs. - This is enabled by default. + Enabled by default. */ bool QQuickWebEngineSettings::javascriptEnabled() const { @@ -94,9 +94,9 @@ bool QQuickWebEngineSettings::javascriptEnabled() const /*! \qmlproperty bool WebEngineSettings::javascriptCanOpenWindows - Specifies whether JavaScript programs can open new windows. + Allows JavaScript programs to open new windows. - This is enabled by default. + Enabled by default. */ bool QQuickWebEngineSettings::javascriptCanOpenWindows() const { @@ -106,9 +106,9 @@ bool QQuickWebEngineSettings::javascriptCanOpenWindows() const /*! \qmlproperty bool WebEngineSettings::javascriptCanAccessClipboard - Specifies whether JavaScript programs can read or write to the clipboard. + Allows JavaScript programs to read from or write to the clipboard. - This is disabled by default. + Disabled by default. */ bool QQuickWebEngineSettings::javascriptCanAccessClipboard() const { @@ -118,9 +118,9 @@ bool QQuickWebEngineSettings::javascriptCanAccessClipboard() const /*! \qmlproperty bool WebEngineSettings::linksIncludedInFocusChain - Specifies whether hyperlinks should be included in the keyboard focus chain. + Includes hyperlinks in the keyboard focus chain. - This is enabled by default. + Enabled by default. */ bool QQuickWebEngineSettings::linksIncludedInFocusChain() const { @@ -130,9 +130,9 @@ bool QQuickWebEngineSettings::linksIncludedInFocusChain() const /*! \qmlproperty bool WebEngineSettings::localStorageEnabled - Specifies whether support for the HTML 5 local storage feature is enabled or not. + Enables support for the HTML 5 local storage feature. - This is enabled by default. + Enabled by default. */ bool QQuickWebEngineSettings::localStorageEnabled() const { @@ -142,10 +142,9 @@ bool QQuickWebEngineSettings::localStorageEnabled() const /*! \qmlproperty bool WebEngineSettings::localContentCanAccessRemoteUrls - Specifies whether locally loaded documents are allowed to access remote urls. - For more information about security origins and local vs. remote content see QWebEngineSecurityOrigin. + Allows locally loaded documents to access remote URLs. - This is disabled by default. + Disabled by default. */ bool QQuickWebEngineSettings::localContentCanAccessRemoteUrls() const { @@ -155,15 +154,14 @@ bool QQuickWebEngineSettings::localContentCanAccessRemoteUrls() const /*! \qmlproperty bool WebEngineSettings::spatialNavigationEnabled - Enables or disables the Spatial Navigation feature, which consists in the - ability to navigate between focusable elements in a Web page, such as hyperlinks - and form controls, by using Left, Right, Up and Down arrow keys. + Enables the Spatial Navigation feature, which means the ability to navigate between focusable + elements, such as hyperlinks and form controls, on a web page by using the Left, Right, Up and + Down arrow keys. - For example, if a user presses the Right key, heuristics determine whether there - is an element they might be trying to reach towards the right and which element - they probably want. + For example, if a user presses the Right key, heuristics determine whether there is an element + they might be trying to reach towards the right and which element they probably want. - This is disabled by default. + Disabled by default. */ bool QQuickWebEngineSettings::spatialNavigationEnabled() const @@ -174,10 +172,9 @@ bool QQuickWebEngineSettings::spatialNavigationEnabled() const /*! \qmlproperty bool WebEngineSettings::localContentCanAccessFileUrls - Specifies whether locally loaded documents are allowed to access other local urls. - For more information about security origins and local vs. remote content see QWebEngineSecurityOrigin. + Allows locally loaded documents to access other local URLs. - This is enabled by default. + Enabled by default. */ bool QQuickWebEngineSettings::localContentCanAccessFileUrls() const { @@ -187,9 +184,9 @@ bool QQuickWebEngineSettings::localContentCanAccessFileUrls() const /*! \qmlproperty bool WebEngineSettings::hyperlinkAuditingEnabled - This setting enables support for the ping attribute for hyperlinks. + Enables support for the \c ping attribute for hyperlinks. - It is disabled by default. + Disabled by default. */ bool QQuickWebEngineSettings::hyperlinkAuditingEnabled() const { @@ -199,9 +196,9 @@ bool QQuickWebEngineSettings::hyperlinkAuditingEnabled() const /*! \qmlproperty bool WebEngineSettings::errorPageEnabled - This setting enables built-in error pages of Chromium. + Enables displaying the built-in error pages of Chromium. - It is enabled by default. + Enabled by default. */ bool QQuickWebEngineSettings::errorPageEnabled() const { @@ -211,10 +208,10 @@ bool QQuickWebEngineSettings::errorPageEnabled() const /*! \qmlproperty QString WebEngineSettings::defaultTextEncoding - The \a encoding, must be a string describing an encoding such as "utf-8", - "iso-8859-1", etc. + Sets the default encoding. The value must be a string describing an encoding such as "utf-8" or + "iso-8859-1". - If left empty a default value will be used. + If left empty, a default value will be used. */ QString QQuickWebEngineSettings::defaultTextEncoding() const { -- cgit v1.2.3 From d3e01e7a2bb3e5d52dc95c8c16ed8e128780e885 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 26 Aug 2015 13:26:45 +0200 Subject: Fix Q_PROPERTY declaration in QQuickWebEngineDownloadItem qquickwebenginedownloaditem_p.h:74: warning: Failed to parse token ( in property declaration Change-Id: I4d9bb4eed5f6fbcc4b81fdad94577f9f06daca39 Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Andras Becsi --- src/webengine/api/qquickwebenginedownloaditem_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebenginedownloaditem_p.h b/src/webengine/api/qquickwebenginedownloaditem_p.h index f43eda17c..9a30eb4ca 100644 --- a/src/webengine/api/qquickwebenginedownloaditem_p.h +++ b/src/webengine/api/qquickwebenginedownloaditem_p.h @@ -71,7 +71,7 @@ public: }; Q_ENUMS(DownloadState) - Q_PROPERTY(quint32 id READ id() CONSTANT FINAL) + Q_PROPERTY(quint32 id READ id CONSTANT FINAL) Q_PROPERTY(DownloadState state READ state NOTIFY stateChanged) Q_PROPERTY(qint64 totalBytes READ totalBytes NOTIFY totalBytesChanged) Q_PROPERTY(qint64 receivedBytes READ receivedBytes NOTIFY receivedBytesChanged) -- cgit v1.2.3 From 0fedd03f9ffab1556c7404a98df64c9cf34f8c57 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 25 Aug 2015 11:19:33 +0200 Subject: Mark properties/slots new in Qt 5.5 to be only available in 1.1 Change-Id: Ib36ee2849616461b4214c912cde6b5c7a758b68b Reviewed-by: Allan Sandfeld Jensen --- src/webengine/api/qquickwebengineview_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebengineview_p.h b/src/webengine/api/qquickwebengineview_p.h index 3385db425..f85bf64ad 100644 --- a/src/webengine/api/qquickwebengineview_p.h +++ b/src/webengine/api/qquickwebengineview_p.h @@ -99,7 +99,7 @@ class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineView : public QQuickItem { Q_PROPERTY(QQuickWebEngineSettings *settings READ settings REVISION 1) Q_PROPERTY(QQuickWebEngineHistory *navigationHistory READ navigationHistory CONSTANT FINAL REVISION 1) Q_PROPERTY(QQmlWebChannel *webChannel READ webChannel WRITE setWebChannel NOTIFY webChannelChanged REVISION 1) - Q_PROPERTY(QQmlListProperty userScripts READ userScripts FINAL) + Q_PROPERTY(QQmlListProperty userScripts READ userScripts FINAL REVISION 1) #ifdef ENABLE_QML_TESTSUPPORT_API Q_PROPERTY(QQuickWebEngineTestSupport *testSupport READ testSupport WRITE setTestSupport FINAL) @@ -216,9 +216,9 @@ public Q_SLOTS: void loadHtml(const QString &html, const QUrl &baseUrl = QUrl()); void goBack(); void goForward(); - void goBackOrForward(int index); + Q_REVISION(1) void goBackOrForward(int index); void reload(); - void reloadAndBypassCache(); + Q_REVISION(1) void reloadAndBypassCache(); void stop(); Q_REVISION(1) void findText(const QString &subString, FindFlags options = 0, const QJSValue &callback = QJSValue()); Q_REVISION(1) void fullScreenCancelled(); -- cgit v1.2.3 From d7833923646ff0a3f62748a68d4a4e6ef407e882 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 26 Aug 2015 13:29:14 +0200 Subject: Doc: Fix see also link qquickwebenginecertificateerror.cpp:61: warning: Can't link to 'WebEngineCertificateError::certificateError' Change-Id: I436388a2cf24edaf159942e964b480b877907de2 Reviewed-by: Leena Miettinen --- src/webengine/api/qquickwebenginecertificateerror.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebenginecertificateerror.cpp b/src/webengine/api/qquickwebenginecertificateerror.cpp index 010c66be5..202d201b3 100644 --- a/src/webengine/api/qquickwebenginecertificateerror.cpp +++ b/src/webengine/api/qquickwebenginecertificateerror.cpp @@ -69,7 +69,7 @@ public: This class contains information about a certificate error that happened and provides a way to accept or deny a certificate exception. - \sa WebEngineCertificateError::certificateError + \sa WebEngineView::certificateError */ QQuickWebEngineCertificateError::QQuickWebEngineCertificateError(const QSharedPointer &controller, QObject *parent) : QObject(parent) -- cgit v1.2.3 From 54630a8eddfa3d98a89f198fcf5890e7a0d43a5b Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 27 Aug 2015 10:58:36 +0200 Subject: Doc: edit WebEngineDownload docs - Use the \value command for enum values - Use standard phrasing for property docs - Edit grammar and style Change-Id: Ia4cc6db4478264aeb87772088fdd58890423ee20 Reviewed-by: Maurice Kalinowski Reviewed-by: Kai Koehne --- src/webengine/api/qquickwebenginedownloaditem.cpp | 51 ++++++++--------------- 1 file changed, 17 insertions(+), 34 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp index 64e75a086..89fe688a4 100644 --- a/src/webengine/api/qquickwebenginedownloaditem.cpp +++ b/src/webengine/api/qquickwebenginedownloaditem.cpp @@ -77,11 +77,11 @@ QQuickWebEngineDownloadItemPrivate::~QQuickWebEngineDownloadItemPrivate() \instantiates QQuickWebEngineDownloadItem \inqmlmodule QtWebEngine 1.1 \since QtWebEngine 1.1 - \brief A WebEngineDownloadItem provides information about a download. + \brief Provides information about a download. - WebEngineDownloadItem stores the state of a download to be used to manage requested downloads. + Stores the state of a download to be used to manage requested downloads. - By default the download is rejected unless the user explicitly accepts it with + By default, the download is rejected unless the user explicitly accepts it with WebEngineDownloadItem::accept(). */ @@ -157,7 +157,7 @@ void QQuickWebEngineDownloadItem::cancel() /*! \qmlproperty quint32 WebEngineDownloadItem::id - The download item's id. + Holds the download item's ID. */ quint32 QQuickWebEngineDownloadItem::id() const @@ -169,33 +169,16 @@ quint32 QQuickWebEngineDownloadItem::id() const /*! \qmlproperty enumeration WebEngineDownloadItem::state - This property describes the state in which the download is in. + Describes the state of the download: - The state can be one of: - - \table - - \header - \li Constant - \li Description - - \row - \li DownloadRequested - \li The download has been requested, but has not been accepted yet. - - \row - \li DownloadInProgress - \li The download is in progress. - - \row - \li DownloadCompleted - \li The download completed successfully. - - \row - \li DownloadInterrupted - \li The download has been interrupted (by the server or because of lost connectivity). - - \endtable + \value DownloadRequested + Download has been requested, but it has not been accepted yet. + \value DownloadInProgress + Download is in progress. + \value DownloadCompleted + Download completed successfully. + \value DownloadInterrupted + Download has been interrupted (by the server or because of lost connectivity). */ QQuickWebEngineDownloadItem::DownloadState QQuickWebEngineDownloadItem::state() const @@ -207,9 +190,9 @@ QQuickWebEngineDownloadItem::DownloadState QQuickWebEngineDownloadItem::state() /*! \qmlproperty int WebEngineDownloadItem::totalBytes - The download's total size in bytes. + Holds the total amount of data to download in bytes. - -1 means the total size is unknown. + \c -1 means the total size is unknown. */ qint64 QQuickWebEngineDownloadItem::totalBytes() const @@ -221,7 +204,7 @@ qint64 QQuickWebEngineDownloadItem::totalBytes() const /*! \qmlproperty int WebEngineDownloadItem::receivedBytes - The download's bytes that have been received so far. + Holds the amount of data in bytes that has been downloaded so far. */ qint64 QQuickWebEngineDownloadItem::receivedBytes() const @@ -233,7 +216,7 @@ qint64 QQuickWebEngineDownloadItem::receivedBytes() const /*! \qmlproperty QString WebEngineDownloadItem::path - The download item's full target path where it is being downloaded to. + Holds the full target path where data is being downloaded to. The path includes the file name. The default suggested path is the standard download location and file name is deduced not to overwrite already existing files. -- cgit v1.2.3 From 70e8ccc3e14c3e44e216a32d723ac704fb017515 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Thu, 27 Aug 2015 12:00:29 +0200 Subject: Doc: edit WebEngineLoadRequest docs - Add missing documentation - Replace "class" with "type" - Use standard phrasing - Edit for grammar and style Change-Id: I35bcb3c84e87257d56ee5d89847f8ecf302b205b Reviewed-by: Joerg Bornemann --- src/webengine/api/qquickwebengineloadrequest.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebengineloadrequest.cpp b/src/webengine/api/qquickwebengineloadrequest.cpp index c85d0d76f..e94fa7eb9 100644 --- a/src/webengine/api/qquickwebengineloadrequest.cpp +++ b/src/webengine/api/qquickwebengineloadrequest.cpp @@ -62,10 +62,10 @@ public: \inqmlmodule QtWebEngine 1.0 \since QtWebEngine 1.0 - \brief A utility class for the WebEngineView::loadingChanged signal. + \brief A utility type for the WebEngineView::loadingChanged signal. - This class contains information about a requested load of a web page, such as the URL and - current loading status (started, finished, failed). + Contains information about a request for loading a web page, such as the URL and + current loading status (started, succeeded, failed). \sa WebEngineView::loadingChanged */ @@ -81,7 +81,7 @@ QQuickWebEngineLoadRequest::~QQuickWebEngineLoadRequest() /*! \qmlproperty url WebEngineLoadRequest::url - \brief The URL of the load request. + \brief Holds the URL of the load request. */ QUrl QQuickWebEngineLoadRequest::url() const { @@ -92,11 +92,11 @@ QUrl QQuickWebEngineLoadRequest::url() const /*! \qmlproperty enumeration WebEngineLoadRequest::status - This enumeration represents the load status of a web page load request. + This enumeration represents the load status of a web page load request: - \value WebEngineView::LoadStartedStatus The page is currently loading. - \value WebEngineView::LoadSucceededStatus The page has been loaded with success. - \value WebEngineView::LoadFailedStatus The page has failed loading. + \value WebEngineView::LoadStartedStatus Page is currently loading. + \value WebEngineView::LoadSucceededStatus Page has been loaded with success. + \value WebEngineView::LoadFailedStatus Page could not be loaded. \sa WebEngineView::loadingChanged */ @@ -108,6 +108,7 @@ QQuickWebEngineView::LoadStatus QQuickWebEngineLoadRequest::status() const /*! \qmlproperty string WebEngineLoadRequest::errorString + \brief Holds the error message. */ QString QQuickWebEngineLoadRequest::errorString() const { @@ -123,6 +124,7 @@ QQuickWebEngineView::ErrorDomain QQuickWebEngineLoadRequest::errorDomain() const /*! \qmlproperty int WebEngineLoadRequest::errorCode + \brief Holds the error code. */ int QQuickWebEngineLoadRequest::errorCode() const { -- cgit v1.2.3 From 80dd99fceda4c5e8f3ebfc329865f5ae10f906ad Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 28 Aug 2015 10:36:57 +0200 Subject: Doc: edit WebEngineNewViewRequest docs Change-Id: I6597ce1b1bbb8a59f7852ee79c199c5774fc65b8 Reviewed-by: Allan Sandfeld Jensen --- src/webengine/api/qquickwebenginenewviewrequest.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebenginenewviewrequest.cpp b/src/webengine/api/qquickwebenginenewviewrequest.cpp index 36c5e44e1..68ea73208 100644 --- a/src/webengine/api/qquickwebenginenewviewrequest.cpp +++ b/src/webengine/api/qquickwebenginenewviewrequest.cpp @@ -45,9 +45,9 @@ \inqmlmodule QtWebEngine 1.1 \since QtWebEngine 1.1 - \brief A utility class for the WebEngineView::newViewRequested signal. + \brief A utility type for the WebEngineView::newViewRequested signal. - This class contains information about the request of a page to open a new window. + Contains information about a request to load a page in a separate web engine view. \sa WebEngineView::newViewRequested */ @@ -61,7 +61,7 @@ QQuickWebEngineNewViewRequest::~QQuickWebEngineNewViewRequest() /*! \qmlproperty WebEngineView::NewViewDestination WebEngineNewViewRequest::destination - \brief The type of view that is requested by the page. + The type of the view that is requested by the page. */ QQuickWebEngineView::NewViewDestination QQuickWebEngineNewViewRequest::destination() const { @@ -70,9 +70,9 @@ QQuickWebEngineView::NewViewDestination QQuickWebEngineNewViewRequest::destinati /*! \qmlproperty bool WebEngineNewViewRequest::isUserInitiated - \brief Whether this window request was directly triggered as the result of a keyboard or mouse event. + Whether this window request was directly triggered as the result of a keyboard or mouse event. - Use this property to block possibly unwanted "popups". + Use this property to block possibly unwanted \e popups. */ bool QQuickWebEngineNewViewRequest::isUserInitiated() const { @@ -82,9 +82,8 @@ bool QQuickWebEngineNewViewRequest::isUserInitiated() const /*! \qmlmethod WebEngineNewViewRequest::openIn(WebEngineView view) - Call this method to fulfill the request and determine which WebEngineView - should be used to contain the new page. Any state, history or loaded page - within \a view will be lost as result of this. + Opens the requested page in the new web engine view \a view. State and history of the + view and the page possibly loaded in it will be lost. \sa WebEngineView::newViewRequested */ -- cgit v1.2.3 From 60d67ffcadccdbc074d3d40e93357801e417b444 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Fri, 28 Aug 2015 12:29:19 +0200 Subject: Doc: edit WebEngineProfile docs Change-Id: Ifdfb36206c31215687f913e6887c8f9125487cf1 Reviewed-by: Kai Koehne --- src/webengine/api/qquickwebengineprofile.cpp | 98 ++++++++++++---------------- 1 file changed, 43 insertions(+), 55 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index 69c524356..bff640d32 100644 --- a/src/webengine/api/qquickwebengineprofile.cpp +++ b/src/webengine/api/qquickwebengineprofile.cpp @@ -131,13 +131,13 @@ void QQuickWebEngineProfilePrivate::downloadUpdated(const DownloadItemInfo &info \instantiates QQuickWebEngineProfile \inqmlmodule QtWebEngine 1.1 \since QtWebEngine 1.1 - \brief A WebEngineProfile contains common settings for multiple WebEngineView. + \brief Contains common settings for multiple web engine views. - WebEngineProfile contains settings and history shared by all WebEngineView that belong + Contains settings and history shared by all the web engine views that belong to the profile. - A default profile is built-in that all web pages not specifically created with another profile - belongs to. + Each web engine view has an associated profile. Views that do not have a specific profile set + share a common default one. */ /*! @@ -145,16 +145,15 @@ void QQuickWebEngineProfilePrivate::downloadUpdated(const DownloadItemInfo &info This signal is emitted whenever a download has been triggered. The \a download argument holds the state of the download. - The \a download has to be explicitly accepted with WebEngineDownloadItem::accept(), - else the download will be cancelled by default. + The download has to be explicitly accepted with WebEngineDownloadItem::accept() or the + download will be cancelled by default. */ /*! \qmlsignal WebEngineProfile::downloadFinished(WebEngineDownloadItem download) - This signal is emitted whenever a download finishes downloading. - This can be due to the download finishing successfully, being cancelled or - interrupted by lost connectivity for example. + This signal is emitted whenever downloading stops, because it finished successfully, was + cancelled, or was interrupted (for example, because connectivity was lost). The \a download argument holds the state of the finished download instance. */ @@ -178,7 +177,10 @@ QQuickWebEngineProfile::~QQuickWebEngineProfile() /*! \qmlproperty QString WebEngineProfile::storageName - The storage name is used to give each profile that uses the disk separate subdirectories for persistent data and cache. + The storage name that is used to create separate subdirectories for each profile that uses + the disk for storing persistent data and cache. + + \sa WebEngineProfile::persistentStoragePath, WebEngineProfile::cachePath */ QString QQuickWebEngineProfile::storageName() const @@ -207,8 +209,9 @@ void QQuickWebEngineProfile::setStorageName(const QString &name) /*! \qmlproperty bool WebEngineProfile::offTheRecord - An offTheRecord profile forces cookies and HTTP cache to be in memory, but also force - all other normally persistent data to be stored in memory. + Whether the web engine profile is \e off-the-record. + An off-the-record profile forces cookies, the HTTP cache, and other normally persistent data + to be stored only in memory. */ bool QQuickWebEngineProfile::isOffTheRecord() const { @@ -234,10 +237,12 @@ void QQuickWebEngineProfile::setOffTheRecord(bool offTheRecord) /*! \qmlproperty QString WebEngineProfile::persistentStoragePath - The persistent storage path is where persistent data for the browser and web content is stored. - Persistent data includes persistent cookies, HTML5 local storage and visited links. + The path to the location where the persistent data for the browser and web content are + stored. Persistent data includes persistent cookies, HTML5 local storage, and visited links. - By default this is below QStandardPaths::writableLocation(QStandardPaths::DataLocation) in a storageName specific directory. + By default, the storage is located below + QStandardPaths::writableLocation(QStandardPaths::DataLocation) in a directory named using + storageName. */ QString QQuickWebEngineProfile::persistentStoragePath() const { @@ -257,7 +262,11 @@ void QQuickWebEngineProfile::setPersistentStoragePath(const QString &path) /*! \qmlproperty QString WebEngineProfile::cachePath - By default this is below QStandardPaths::writableLocation(QStandardPaths::CacheLocation) in a storageName specific directory. + The path to the location where the profile's caches are stored, in particular the HTTP cache. + + By default, the caches are stored + below QStandardPaths::writableLocation(QStandardPaths::CacheLocation) in a directory named using + storageName. */ QString QQuickWebEngineProfile::cachePath() const { @@ -277,7 +286,7 @@ void QQuickWebEngineProfile::setCachePath(const QString &path) /*! \qmlproperty QString WebEngineProfile::httpUserAgent - The user-agent string send with HTTP to identify the browser. + The user-agent string sent with HTTP to identify the browser. */ QString QQuickWebEngineProfile::httpUserAgent() const { @@ -298,23 +307,13 @@ void QQuickWebEngineProfile::setHttpUserAgent(const QString &userAgent) /*! \qmlproperty enumeration WebEngineProfile::httpCacheType - The type of the HTTP cache. - - \table - - \header - \li Constant - \li Description - - \row - \li MemoryHttpCache - \li Use a in-memory cache. This is the only setting possible if offTheRecord is set or no cachePath is available. - - \row - \li DiskHttpCache - \li DiskHttpCache Use a disk cache. This is the default. + This enumeration describes the type of the HTTP cache: - \endtable + \value MemoryHttpCache + Uses an in-memory cache. This is the only setting possible if offTheRecord is set or + no persistentStoragePath is available. + \value DiskHttpCache + Uses a disk cache. This is the default value. */ QQuickWebEngineProfile::HttpCacheType QQuickWebEngineProfile::httpCacheType() const @@ -335,27 +334,16 @@ void QQuickWebEngineProfile::setHttpCacheType(QQuickWebEngineProfile::HttpCacheT /*! \qmlproperty enumeration WebEngineProfile::persistentCookiesPolicy - The policy of cookie persistency. - - \table - - \header - \li Constant - \li Description - - \row - \li NoPersistentCookies - \li Both session and persistent cookies are stored in memory. This is the only setting possible if offTheRecord is set or no persistentStoragePath is available. - - \row - \li AllowPersistentCookies - \li Cookies marked persistent are save and restored from disk, session cookies are only stored to disk for crash recovery. This is the default setting. - - \row - \li ForcePersistentCookies - \li Both session and persistent cookies are save and restored from disk. + This enumeration describes the policy of cookie persistency: - \endtable + \value NoPersistentCookies + Both session and persistent cookies are stored in memory. This is the only setting + possible if offTheRecord is set or no persistentStoragePath is available. + \value AllowPersistentCookies + Cookies marked persistent are saved to and restored from disk, whereas session cookies + are only stored to disk for crash recovery. This is the default setting. + \value ForcePersistentCookies + Both session and persistent cookies are saved to and restored from disk. */ QQuickWebEngineProfile::PersistentCookiesPolicy QQuickWebEngineProfile::persistentCookiesPolicy() const @@ -376,8 +364,8 @@ void QQuickWebEngineProfile::setPersistentCookiesPolicy(QQuickWebEngineProfile:: /*! \qmlproperty int WebEngineProfile::httpCacheMaximumSize - The maximum size of the HTTP cache. If 0 it means the size will be controlled automatically by QtWebEngine. - The default value is 0. + The maximum size of the HTTP cache. If \c 0, the size will be controlled automatically by + QtWebEngine. The default value is \c 0. \sa httpCacheType */ -- cgit v1.2.3 From 3f9c6206450b0c67a5dadfe0da023ec6be7d1743 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Thu, 3 Sep 2015 14:20:27 +0200 Subject: fix include The global include must either be prefixed with private/ or locally included. Change-Id: I7933d940bdddae4975db8e58fe52a887adec51ff Reviewed-by: Allan Sandfeld Jensen --- src/webengine/api/qquickwebenginesingleton_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebenginesingleton_p.h b/src/webengine/api/qquickwebenginesingleton_p.h index 744e4a9bf..64668420c 100644 --- a/src/webengine/api/qquickwebenginesingleton_p.h +++ b/src/webengine/api/qquickwebenginesingleton_p.h @@ -49,7 +49,7 @@ // #include -#include +#include "qtwebengineglobal_p.h" QT_BEGIN_NAMESPACE class QQuickWebEngineProfile; -- cgit v1.2.3 From 003924d46e5f886eca1fa3fd220e3d1b652322fb Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 3 Sep 2015 13:20:24 +0200 Subject: Break destruction cycle between DownloadItem and WebEngineProfile All QQWebEngineDownloadItem objects are destructed as child objects of QQWebEngineProfile. However, they try to 'call back' to the already half-destructed QQWebEngineProfile object to unregister themselves. Avoid this by tracking the lifetime of the QWebEngineProfile with a QPointer. Task-number: QTBUG-48088 Change-Id: Ie6a76440ad9f37d7cbc38b4ce35bf5da785d0e2a Reviewed-by: Allan Sandfeld Jensen --- src/webengine/api/qquickwebenginedownloaditem.cpp | 11 +++++++---- src/webengine/api/qquickwebenginedownloaditem_p_p.h | 6 ++++-- src/webengine/api/qquickwebengineprofile.cpp | 2 +- src/webengine/api/qquickwebengineprofile_p.h | 2 ++ 4 files changed, 14 insertions(+), 7 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp index 89fe688a4..e04cff2c4 100644 --- a/src/webengine/api/qquickwebenginedownloaditem.cpp +++ b/src/webengine/api/qquickwebenginedownloaditem.cpp @@ -58,7 +58,7 @@ static inline QQuickWebEngineDownloadItem::DownloadState toDownloadState(int sta } } -QQuickWebEngineDownloadItemPrivate::QQuickWebEngineDownloadItemPrivate(QQuickWebEngineProfilePrivate *p) +QQuickWebEngineDownloadItemPrivate::QQuickWebEngineDownloadItemPrivate(QQuickWebEngineProfile *p) : profile(p) , downloadId(-1) , downloadState(QQuickWebEngineDownloadItem::DownloadCancelled) @@ -69,7 +69,8 @@ QQuickWebEngineDownloadItemPrivate::QQuickWebEngineDownloadItemPrivate(QQuickWeb QQuickWebEngineDownloadItemPrivate::~QQuickWebEngineDownloadItemPrivate() { - profile->downloadDestroyed(downloadId); + if (profile) + profile->d_ptr->downloadDestroyed(downloadId); } /*! @@ -150,8 +151,10 @@ void QQuickWebEngineDownloadItem::cancel() // We directly cancel the download if the user cancels before // it even started, so no need to notify the profile here. - if (state == QQuickWebEngineDownloadItem::DownloadInProgress) - d->profile->cancelDownload(d->downloadId); + if (state == QQuickWebEngineDownloadItem::DownloadInProgress) { + if (d->profile) + d->profile->d_ptr->cancelDownload(d->downloadId); + } } /*! diff --git a/src/webengine/api/qquickwebenginedownloaditem_p_p.h b/src/webengine/api/qquickwebenginedownloaditem_p_p.h index c858693e0..230f322b5 100644 --- a/src/webengine/api/qquickwebenginedownloaditem_p_p.h +++ b/src/webengine/api/qquickwebenginedownloaditem_p_p.h @@ -50,19 +50,21 @@ #include "browser_context_adapter_client.h" #include "qquickwebenginedownloaditem_p.h" +#include "qquickwebengineprofile_p.h" #include #include +#include QT_BEGIN_NAMESPACE class QQuickWebEngineProfilePrivate; class QQuickWebEngineDownloadItemPrivate { QQuickWebEngineDownloadItem *q_ptr; - QQuickWebEngineProfilePrivate* profile; + QPointer profile; friend class QQuickWebEngineProfilePrivate; public: Q_DECLARE_PUBLIC(QQuickWebEngineDownloadItem) - QQuickWebEngineDownloadItemPrivate(QQuickWebEngineProfilePrivate *p); + QQuickWebEngineDownloadItemPrivate(QQuickWebEngineProfile *p); ~QQuickWebEngineDownloadItemPrivate(); quint32 downloadId; diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index bff640d32..68884f967 100644 --- a/src/webengine/api/qquickwebengineprofile.cpp +++ b/src/webengine/api/qquickwebengineprofile.cpp @@ -85,7 +85,7 @@ void QQuickWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info) Q_Q(QQuickWebEngineProfile); Q_ASSERT(!m_ongoingDownloads.contains(info.id)); - QQuickWebEngineDownloadItemPrivate *itemPrivate = new QQuickWebEngineDownloadItemPrivate(this); + QQuickWebEngineDownloadItemPrivate *itemPrivate = new QQuickWebEngineDownloadItemPrivate(q); itemPrivate->downloadId = info.id; itemPrivate->downloadState = QQuickWebEngineDownloadItem::DownloadRequested; itemPrivate->totalBytes = info.totalBytes; diff --git a/src/webengine/api/qquickwebengineprofile_p.h b/src/webengine/api/qquickwebengineprofile_p.h index d07428cab..323721bd0 100644 --- a/src/webengine/api/qquickwebengineprofile_p.h +++ b/src/webengine/api/qquickwebengineprofile_p.h @@ -138,6 +138,8 @@ private: friend class QQuickWebEngineSettings; friend class QQuickWebEngineSingleton; friend class QQuickWebEngineViewPrivate; + friend class QQuickWebEngineDownloadItem; + friend class QQuickWebEngineDownloadItemPrivate; QScopedPointer d_ptr; }; -- cgit v1.2.3 From dc16cdd60449112343d43852960142db7fd155fd Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 26 Aug 2015 13:44:45 +0200 Subject: Update WebEngineView documentation The split suggested in the comment does not work: You have to keep the complete documentation for a QML type in one file, the documentation bits in qquickwebengineview.cpp were silently ignored so far. This change moves over the bits from .cpp , adds missing documentation for new elements and sanitizes the output of others. Task-number: QTBUG-47909 Change-Id: Ie1ebb5a9fe952c7a76c8fe1b67135614ca90ce7a Reviewed-by: Allan Sandfeld Jensen Reviewed-by: Leena Miettinen --- src/webengine/api/qquickwebengineview.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src/webengine/api') diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 7405cae44..6c3452a6a 100644 --- a/src/webengine/api/qquickwebengineview.cpp +++ b/src/webengine/api/qquickwebengineview.cpp @@ -705,15 +705,6 @@ void QQuickWebEngineView::setProfile(QQuickWebEngineProfile *profile) Q_D(QQuickWebEngineView); d->setProfile(profile); } -/*! - * \qmlproperty WebEngineSettings QQuickWebEngineView::settings - * \readonly settings - * \since QtWebEngine 1.1 - * - * The \a settings property holds the settings used by this view. - * - * \sa WebEngineSettings - */ QQuickWebEngineSettings *QQuickWebEngineView::settings() const { @@ -903,19 +894,6 @@ QQuickWebEngineHistory *QQuickWebEngineView::navigationHistory() const return d->m_history.data(); } -/*! - * \qmlproperty QQmlWebChannel WebEngineView::webChannel - * \since QtWebEngine 1.1 - * - * The web channel instance used by this view. - * This channel is automatically using the internal QtWebEngine transport mechanism over Chromium IPC, - * and exposed in the javascript context of the page it is rendering as \c qt.webChannelTransport. - * This transport object is used when instantiating the JavaScript counterpart of QWebChannel using - * the \l{Qt WebChannel JavaScript API}. - * - * \note The view does not take ownership when explicitly setting a webChannel object. - */ - QQmlWebChannel *QQuickWebEngineView::webChannel() { Q_D(QQuickWebEngineView); -- cgit v1.2.3