summaryrefslogtreecommitdiffstats
path: root/src/webengine/api/qquickwebenginedownloaditem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Avoid auto-linking the string 'WebEngine' to the QML typeLeena Miettinen2019-04-011-2/+2
| | | | | | | | | | Remove the previous workaround (internal \externalpage command) that was used for this purpose, and replace it with a \QWE macro that expands to the string 'Qt \WebEngine'. The backslash in the expanded string instructs QDoc not to attempt auto-linking the word. Change-Id: If4e1c95423fa07479b1af055e4760a890c0ac667 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Remove download properly on profile destruction to avoid use after freeKirill Burtsev2019-02-191-2/+0
| | | | | | | | | | | | | In the Widgets API, download items are children of the profile and are destroyed when the parent profile destroys its children. The download item's destructor can therefore not access the profile, as it would cause a heap-use-after-free crashes. On quick side turn ongoing downloads cleanup to match widgets one. Fixes: QTBUG-73839 Change-Id: Iabb379e91187e3e68ebcd4693fec35883b72b1f2 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Set download state to finished when cancelling or destroying the download itemKirill Burtsev2019-02-191-4/+16
| | | | | | | Task-number: QTBUG-73839 Change-Id: Ieebaa802bdfe0c410618e4213a9bedbbae9d0f61 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Doc: Fix type of WebEngineDownloadItem::view propertyKirill Burtsev2019-02-191-1/+3
| | | | | | Change-Id: I46fc228d99ad6d89d6f2a79a7f3c3352befe0a64 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Remove download items internally when API objects are deletedAllan Sandfeld Jensen2019-01-211-0/+2
| | | | | | | | | | We were never removing internal download item. [ChangeLog][Behavioral Changes] Deleting a download item will now also cancel it if it is still in progress. Change-Id: I2fab497d7acf7ca6ca17f4a61e106b1c18bfb333 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Add QWebEngineDownloadItem page/view accessorAllan Sandfeld Jensen2018-08-021-0/+15
| | | | | | | | | | To be able to determine where a download was triggered. [ChangeLog][DownloadItem] Added a page/view accessor to tell were the download was triggered. Change-Id: I21843a545a3e0eb66f5e5fa8a50e77564f2118a7 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Rename BrowserAdapterClient to ProfileAdapterClientMichal Klocek2018-07-091-35/+35
| | | | | Change-Id: I1f8c0d2e59c2565b24c8c636553f1b70bcd31774 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-091-3/+3
| | | | | | | | | Follow change of BrowserContextQt to ProfileQt. Fix wrong naming usage of browserContext instead of browserContextAdapter. Change-Id: I75fdac685d9bffd44f0144921d3e87305d6d44c9 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Doc: Remove broken link from web engine download item docsLeena Miettinen2018-03-131-1/+1
| | | | | | | | The doucmented enumerations are obsolete, so the link is not really useful anymore. Change-Id: I9902ed18caa2e8a7a9bbb7935cbd9bb9ae6a88c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Expand docs for WebEngineDownloadItemJüri Valdmann2018-03-121-6/+69
| | | | | Change-Id: I82619627b7dd1fbb86d8f0363de2f6e9666b44d4 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Fixup merge of downloadType from 5.10.1Allan Sandfeld Jensen2018-02-211-7/+20
| | | | | | | | | | | | | In 5.11 we deprecated downloadType and at the same time ripped out most of the faulty logic. Later we partially fixed the logic in 5.10.1, but kept the 5.11 version during the merge. This restores the improved logic from 5.10.1, while keeping the property deprecated since it is still misleading at times. Change-Id: I12ee09a2b212506f7ba1a336c9c2e88aa3b1de24 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Deprecate download typeJüri Valdmann2018-01-021-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the download type property from QtWebEngineCore and replaces it with a simple boolean 'isSavePageDownload'. On the public API boundary the type property is reimplemented via this boolean and documented as obsolete. Rationale being that 1. This feature seems to lack practical use cases, other than perhaps distinguishing save-page downloads from normal file downloads, which can be done in a much simpler way. 2. This feature does not work as documented and never has. So far nobody has complained, hinting again at a lack of practical use cases. 3. In order to fix it we would need to maintain patches on top of Chromium and Blink (we would, for example, need to propagate the DownloadAttribute type from Blink to Chromium to WebEngine). [ChangeLog][Deprecation Notice] (QWebEngine)DownloadItem::type() is deprecated and replaced with the newly introduced isSavePageDownload() property. Task-number: QTBUG-62640 Change-Id: Icf4e1e5a635028986df7eab979f4c0527902ff0c Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Implement pause and resume action in Download ItemsAllan Sandfeld Jensen2017-06-231-0/+82
| | | | | | | | | Adds the ability to pause downloads, and resume paused or interrupted downloads. Task-number: QTBUG-56840 Change-Id: I018bd30c3a772a36d48e4154d94f69cb8d8319e4 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Fix QtWebEngine version numberKai Koehne2017-04-101-2/+2
| | | | | | | | The latest version for Qt Webengine in 5.9 will be 1.5, not 1.6. Change-Id: Ibae42f24f4b7477901923ff0ef5436642599f365 Reviewed-by: Viktor Engelmann <viktor.engelmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Fix link errorNico Vertriest2017-03-281-3/+3
| | | | | | | | qquickwebenginedownloaditem.cpp:368: warning: Can't link to 'interruptReasonString()' Change-Id: Ia77d31851d17808330cfc701691e41eafb8d0aad Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devAllan Sandfeld Jensen2017-01-181-0/+2
|\ | | | | | | Change-Id: If16bfc6f0fbfd0040e13a8a3cbaa113fda10f387
| * Merge remote-tracking branch 'origin/5.8.0' into 5.8Allan Sandfeld Jensen2017-01-161-0/+2
| |\ | | | | | | | | | Change-Id: I6b16bee2d0034865270fb26a5ad93da05b9129fa
| | * Doc: Describe WebEngineDownloadItem.DownloadCancelled enum valueLeena Miettinen2016-12-221-0/+2
| | | | | | | | | | | | | | | Change-Id: I829cd3225858be5c10b00ee5b9c586abb6431111 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | Add methods for textual description of DownloadInterruptReasonViktor Engelmann2017-01-121-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A method was added to get a textual description of a Q(Quick)WebEngineDownloadItem::DownloadInterruptReason. Basically returns the same description from the QDoc entry, but shortened where that was to long. Also moved the ASSERT_ENUMS_MATCHes from download_manager_delegate_qt.cpp to the newly created browser_context_adapter_client.cpp. Task-number: QTBUG-56839 Change-Id: I17c68987b7f12fcaeb71fd27f7ebb35c0ac87bac Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Merge branch '5.8' into devAllan Sandfeld Jensen2016-12-211-3/+1
|\| | | | | | | | | | | | | | | | | | | | Conflicts: configure.json Change-Id: I658a02de96b45b382f0f6c383964501b794b5eb6
| * | Improve WebEngineDownloadItem documentationKai Koehne2016-12-201-3/+1
| |/ | | | | | | | | Change-Id: Ic5a771df8092ee217fffa2b14ccbd7e539f356f1 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* / Add DownloadInterruptReason to Q(Quick)WebEngineDownloadItemViktor Engelmann2016-12-071-0/+85
|/ | | | | | | | | | | | | | Add enum DownloadInterruptReason to BrowserContextAdapterClient, QWebEngineDownloadItem and QQuickWebEngineDownloadItem. Also add corresponding attributes to BrowserContextAdapterClient::DownloadItemInfo, QWebEngineDownloadItemPrivate and QQuickWebEngineDownloadItemPrivate as well as getters in QWebEngineDownloadItem and QQuickWebEngineDownloadItem and interruptReasonChanged signals. Task-number: QTBUG-56839 Change-Id: I937c14ba0b0884b14ae18ba297024b76dde62605 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-10-061-3/+3
|\ | | | | | | | | | | | | | | Conflicts: src/3rdparty src/webengine/api/qquickwebenginesettings.cpp Change-Id: Ie4abadb076c51d070cbb05f29b9ebcd9705933ad
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-241-3/+3
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/webengine/api/qquickwebenginesettings.cpp Change-Id: Ib7e2a7558c685410c49c455218d3b9c30f32358f
| | * Doc: Fix types of \qmlpropertyKai Koehne2016-09-191-3/+3
| | | | | | | | | | | | | | | Change-Id: Ie355f72a0bf575e66ab465fb2fcada0430ed8c7c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Doc: Replace external w3schools link with standard oneKai Koehne2016-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Also change title to be lower case. Change-Id: I333a1a2854308b44f58e15a61dd7316787440952 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Fix documentation for new WebEngineDownloadItem::type enumerationKai Koehne2016-09-261-7/+10
| | | | | | | | | | | | | | | Change-Id: Iaa6d1daa66d6c49c0545d36041485c7156003805 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-9/+13
|\| | | | | | | | | | | Change-Id: Id5f97771be23a4393e8d3be98903c321377ae809
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-161-4/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/webengine/api/qquickwebenginecertificateerror.cpp src/webengine/doc/src/webengineview.qdoc tools/qmake/config.tests/libcap/libcap.cpp Change-Id: I2a2cfc904a8d6b561fb71ef7a0cc4bfb860124db
| | * Doc: Add type name to enumeration values to follow the doc conventionLeena Miettinen2016-08-091-4/+4
| | | | | | | | | | | | | | | Change-Id: I86eea3a64a38f6ec9984f663499abffa03cd9eb2 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * | Doc: Add type name to enumeration values added in Qt WebEngine 1.3Leena Miettinen2016-08-081-5/+9
| | | | | | | | | | | | | | | Change-Id: I8f3aa86b451e57d01937559e595a439529a839ce Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | Add a DownloadType enum property to WebEngineDownloadItemAdam Kallai2016-06-221-0/+24
|/ / | | | | | | | | | | | | | | | | | | | | With this property the user gets the requested download's type. In other words, the user can identify the download where it comes from based on the type. Update public API list as well. Change-Id: I2b066d7eb4df1134266ad67ade0066e3bcc2b454 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge branch '5.6' into 5.7Allan Sandfeld Jensen2016-04-111-0/+1
|\| | | | | | | Change-Id: I53645ee5405b1c43807123fd3c196e314cfd1ce9
| * Revision DownloadItem.mimeTypeKai Koehne2016-04-051-0/+1
| | | | | | | | | | | | | | | | The property was already revisioned, but the signal was not. Also mark the property as new in the documentation. Change-Id: Iab50bea0d593e9dafb3e58b7f99dd5b95655a1a9 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Mark revision of WebEngineDownloadItem::savePageFormatKai Koehne2016-04-051-0/+1
| | | | | | | | | | | | | | | | This property is new in Qt 5.7 / QtWebEngine 1.3 Task-number: QTBUG-52338 Change-Id: Ib15a219bd1ec1e542d1c5c13a812b0022485485c Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Unify license header usage.Jani Heikkinen2016-02-011-11/+14
| | | | | | | | | | | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-121-2/+14
|\| | | | | | | Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
| * Make QQuickWebEngineProfile publicKai Koehne2015-12-121-1/+1
| | | | | | | | | | | | | | | | | | Make QQuickWebEngineProfile a publicly exported class. This allows users to set up and manipulate the profile from C++, and removes the ugly hack needed to access the cookie store. Change-Id: I99e1a8c2cb99d9d1a14e1c78bec5948ba1282fb3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
| * Remove explicit version \inqmlmoduleKai Koehne2015-12-101-1/+1
| | | | | | | | | | | | | | Also bump version in \qmlmodule QtWebEngine 1.2 Change-Id: I4d0379a3a46548e626508a8cf1fad51f742c8ddb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
| * Make the MIME-type of downloads availableAllan Sandfeld Jensen2015-12-071-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | An application currently have to rely on suggested filename only to guess the type of a download. This is often insufficient when the suffix is misleading or missing. This patch adds the mimetype to the reported metadata and also adds a mimetype appropriate suffix to suggested filenames. Task-number: QTBUG-48206 Change-Id: I4c70f076d6eb5ae820fd6b7f568515eeb7c18df5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add web action for saving the current web pageJoerg Bornemann2015-12-111-0/+29
|/ | | | | | | | Add the possibility to save web pages as single HTML file, complete HTML (with resource directory) or MHTML archive. Change-Id: Ic7e7cfda9432f3534c13350a6369d79bb17fd8b3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Doc: Fix a number of documentation warningsTopi Reinio2015-09-231-1/+1
| | | | | | | | Fix minor language issues, and link to QML signals similarly as one would to a method. Change-Id: Ib9da8c66fd10c5543f5272f5bf6e1027e84b9a73 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* Break destruction cycle between DownloadItem and WebEngineProfileKai Koehne2015-09-041-4/+7
| | | | | | | | | | | | | | 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 <allan.jensen@theqtcompany.com>
* Doc: edit WebEngineDownload docsLeena Miettinen2015-08-271-34/+17
| | | | | | | | | | - Use the \value command for enum values - Use standard phrasing for property docs - Edit grammar and style Change-Id: Ia4cc6db4478264aeb87772088fdd58890423ee20 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Fix QQuickWebEngineDownloadItem member initializatonAdam Kallai2015-04-141-0/+2
| | | | | | | The totalBytes member has to be set before the downloadRequest would be emitted. Change-Id: Ifc164fb2d7f3318b825e28edb5b200ab623740d5 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Add namespace to internal QtWebEngine APIAllan Sandfeld Jensen2015-03-021-0/+3
| | | | | | | | Adds the QtWebEngineCore namespace to all internal core API. This ensures we don't export any internal symbols in the global namespace. Change-Id: I26af888ea7c6c4c4d0f04c24a377c1a9d3c92751 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: Ieb6bac7a1be5c25eb7cb917495b58b6a870ca6d4 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Update QML download API to match widgets and add documentationAndras Becsi2015-02-061-24/+163
| | | | | | | | | | | | | Rename the download signal to downloadRequested and only start a download if it has been explicitly accepted by the user, else cancel it by default. Replace the downloadPercentage property with totalBytes and receivedBytes to also give the user information about download size. Additionally this patch adds missing documentation. Change-Id: I9d895386cf033f2efffe3ebac6f08f94c6fe0c19 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com> Reviewed-by: Jocelyn Turcotte <jturcotte@woboq.com>
* Add DownloadItemInfo to BrowserContextAdapterClientAndras Becsi2015-01-201-2/+1
| | | | | | | | | | | This extends the carried information from Chromium's content::DownloadItem with url, totalBytes and receivedBytes in preparation of adding a Widget API for downloads. DownloadItemInfo struct is now constructed to carry information about individual downloads from the content layer to the Qt API layer. Change-Id: I3ee7aea02b74994e612e1b3709195776d5e7570b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Add QML download APIAndras Becsi2015-01-121-0/+134
This patch exposes downloadStarted and downloadFinished signals on the WebEngineProfile to notify about downloads. The WebEngineDownloadItem exposes a subset of Chromium's content::DownloadItem functionality. For now we expose minimal requirements to be able to control downloads in QML but this can be extended in the future. This patch also adds a DownloadView to quicktestbrowser to demonstrate the usage of the new API. [ChangeLog][QtWebEngineQML] Add QtQuick download API Change-Id: I8d8f0daf02c4e0151000427fc2a4b37d28b9db52 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>