summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebengineprofile.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix QDoc warningsLeena Miettinen2019-05-031-2/+2
| | | | | Change-Id: I00ec352cdea43d44388889805f1bd609a3555c4c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Add \since tag for QWebEngineProfile::setDownloadPathv5.13.0-beta3Kai Koehne2019-04-131-0/+2
| | | | | Change-Id: I3638fd51bbb871b7dc920a7c3e1435c26db02f7c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Notification API cleanupKirill Burtsev2019-04-051-4/+6
| | | | | | Task-number: QTBUG-74543 Change-Id: Ice5a0dbfc3485c8b7e6fa900ef427a9aed871d42 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix -no-ssl buildv5.13.0-beta1Peter Varga2019-03-071-0/+4
| | | | | Change-Id: I978f70545484060218f5243c74978c85bc603c16 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Allan Sandfeld Jensen2019-03-041-10/+30
|\ | | | | | | Change-Id: I1dd136df7004b11e2f38a2ec4e82a6fa81627479
| * Force destruction of webcontent client before profile adapterMichal Klocek2019-03-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently users might forget to delete webcontent client before profile adapter. This might be nasty if users are not aware of default profile. Instead of asserting badly in chromium, clean up and release chromium resources. This avoids the crash, but might leak memory if users never deletes page. Task-number: QTBUG-74021 Change-Id: I66f466f169d12f7ee08866d505260dca47800bb0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Remove download properly on profile destruction to avoid use after freeKirill Burtsev2019-02-191-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Tie client certificate stores to profilesAllan Sandfeld Jensen2019-03-011-0/+11
| | | | | | | | | | | | | | | | Move the client certificate store from being global to being tied to individual profiles. Change-Id: Ib21ae14c501b7d0612b84ae7535120291aeeada2 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | API cleanupAllan Sandfeld Jensen2019-02-271-15/+7
| | | | | | | | | | | | | | Based on review feedback Change-Id: Ide40d4fd563ea682eaa2cc457d857445adea85cd Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix crash on unsetting request interceptorAllan Sandfeld Jensen2019-02-261-2/+4
| | | | | | | | | | | | | | | | | | Don't access nullpointer. Also don't print developer warnings to end-users. Change-Id: I273101dd581a335464ff2dbae5095bc99e455649 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Web Notifications APIKirill Burtsev2019-02-061-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements API for end-user notifications. Co-authored by Allan Sandfeld Jensen [ChangeLog][Profile] Support for Web Notifications API for end-user notifications through QWebEngineNotification Task-number: QTBUG-50995 Fixes: QTBUG-51191 Change-Id: Icebaaa05275a713e801f1f8ecdaaec725fa264c8 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Move QWebEngineUrlRequestInterceptor::intercept to ui threadMichal Klocek2019-02-041-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently interceptor sufferers thread safety issues, when custom profiles are deleted, interceptor is set to be nullptr, however it can be still referenced in IO thread. Since profile was split to ui and io part, where io part can outlive the ui part, this can boost thread safety issues. Since QWebEngineUrlRequestInterceptor is living on ui thread simplify the logic move intercept call to ui thread. This fixes the issue of referencing interceptor in io thread. Add new method to install interceptor setUrlRequestInterceptor, and deprecate old one. Update interceptor install method name on page to match the profile one. Task-number: QTBUG-69844 Change-Id: I5dd2b6b734fd91906cccc6c1408ffbe7b1b4250c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add API to set default download pathTamas Zakor2019-01-301-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add functions and property to set the default download location in QWebEngineProfile and QQuickWebEngineProfile. Also add new test for check uniquifying download filename. Update plugins.qmltypes to 1.9 [ChangeLog][Profile][QtWebEngine][QtWebEngineWidgets] Add functions and property to set the default download location in QWebEngineProfile and QQuickWebEngineProfile. Task-number: QTBUG-66262 Task-number: QTBUG-72176 Change-Id: I7fa93b66c326766b176aec24d453dd75602b91de Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devMichael Brüning2018-12-181-1/+2
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/compositor/delegated_frame_node.cpp src/core/profile_adapter.cpp src/core/profile_io_data_qt.cpp src/webengine/api/qquickwebengineprofile.cpp src/webenginewidgets/api/qwebengineprofile.cpp Change-Id: I35ec8480e758bbcb6c5942a5401cb1b6dbdcc428
| * Document and safeguard usage of custom schemesAlexandru Croitor2018-12-121-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change improves the documentation of QWebEngineUrlSchemeHandler to notify the requirement of registering a custom scheme before installing a custom scheme handler. Also start showing warnings when QWebEngineProfile::installUrlSchemeHandler() is called before a scheme is registered. Also show warnings when installing the handler using QML. Task-number: QTBUG-72079 Change-Id: If249592ea43fe2f9ad587a6ff4e8c9dedcc5d3d3 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Move the profiles' url scheme handler API to coreJüri Valdmann2018-10-311-42/+5
| | | | | | | | | | | | | | | | | | | | Implementation of the url scheme handler API in QWebEngineProfile and QQuickWebEngineProfile is exactly identical, so move it to the ProfileAdapter instead. Change-Id: I01baf1c4e5b3c393675adefb0470def90b8b2813 Task-number: QTBUG-71215 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Make it possible to enable OCSP on LinuxAllan Sandfeld Jensen2018-10-171-0/+35
|/ | | | | | | | | | | | | The code follows Chromium and also set a CertNetFetcher on both Linux and macOS, but it appears to be currently unused. [ChangeLog][QWebEngineProfile] A profile can now be designated to download OCSP records and thus enable OCSP verification on Linux. Task-number: QTBUG-58059 Task-number: QTBUG-71164 Change-Id: I84fd34d4351cb7aa4417ce4058f97bad4b8d0cd4 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Merge remote-tracking branch 'origin/5.11' into 5.12Liang Qi2018-09-271-1/+8
|\ | | | | | | | | | | | | | | | | Conflicts: configure.json configure.pri src/3rdparty Change-Id: I2e0614b33596fe66999508556c464ed84acc8e2f
| * Doc: Mention that profile storage paths must be set before useLeena Miettinen2018-09-241-1/+8
| | | | | | | | | | | | Task-number: QTBUG-66871 Change-Id: I246d667dfe341a6bfe7a74b24286403bec4dde8b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Improve QWebEngineUrlScheme APIJüri Valdmann2018-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following feedback from 5.12 API review: - Use enum class for Syntax - Add Q_FLAG for Flags - Mark constructor from name as explicit - Rename Secure to SecureScheme - Rename Local to LocalScheme - Rename addScheme to registerScheme - Rename findScheme to schemeByName Task-number: QTBUG-70247 Change-Id: Iae332c8d9843349506e8a4b07d70f0d234597375 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fix running webengine without default profileMichal Klocek2018-08-031-2/+2
| | | | | | | | | | | | | | | | | | If default profile is not needed do not create by accident one in ~QWebEngineProfilePrivate. Task-number: QTBUG-66068 Change-Id: Ib4131268686178560f3a89dce41e59eb57613e17 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add QWebEngineUrlScheme classJüri Valdmann2018-08-021-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Public API for the new url/url_util_qt extension to Chromium, which allows to integrate custom schemes into Chromium's url parsing library and security model. Previously custom schemes would be treated as 'unknown' schemes and rely on fallback behavior in Chromium. [ChangeLog][Custom Schemes] Added the QWebEngineUrlScheme class for configuring how custom schemes are parsed and which security restrictions should apply. Task-number: QTBUG-62536 Change-Id: I7d8b9da3ad742f568b82ccc6a2456ad35e84069b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add QWebEngineDownloadItem page/view accessorAllan Sandfeld Jensen2018-08-021-1/+6
| | | | | | | | | | | | | | | | | | | | 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-5/+5
| | | | | | | | | | Change-Id: I1f8c0d2e59c2565b24c8c636553f1b70bcd31774 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Rename BrowserContextAdapter to ProfileAdapterMichal Klocek2018-07-091-50/+50
| | | | | | | | | | | | | | | | | | 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>
* | Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-061-1/+1
| | | | | | | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Unify and simplify profile constructorsMichal Klocek2018-05-281-17/+3
| | | | | | | | | | | | | | Use one constructor for private profile creation. Change-Id: I57a227b6344b6e308cfd4931986fa1dede75cfce Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Change BrowserContextAdapter to be QPointerMichal Klocek2018-05-181-14/+36
|/ | | | | | | | | | | | | | | | | | | BrowserContextAdapter is living and accessed only in UI thread, remove QSharedPointer usage and change QWebengineProfile to use QPointer. Prevent BrowserContextAdapter outliving WebEngineContext by setting globalObject as a parent to track WebEngineContext destruction. This commits tries to simplify the life cycle handling of browser context, it removes profile shutdown methods and QWebEngineBrowserContext, which was used to track profile destruction. Task-number: QTBUG-62147 Change-Id: I79f2c38a123cd053e3a59f4900afbdc759a396fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fixup merge of downloadType from 5.10.1Allan Sandfeld Jensen2018-02-211-1/+1
| | | | | | | | | | | | | 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>
* Allow disabling cache of off-the-record profilesAllan Sandfeld Jensen2018-02-151-3/+5
| | | | | Change-Id: Ib319f46465e9f330ef5f2c7a5b2f6a3d50c33c00 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Correct documentation for storage pathsMichal Klocek2018-02-121-4/+10
| | | | | | | | Udpdate docs and profile unit test for storage paths. Change-Id: I646a33571ad8458af4efcddf310489cdde3a4606 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devAllan Sandfeld Jensen2018-01-171-19/+5
|\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/webengine/api/qquickwebengineview_p_p.h src/webenginewidgets/api/qwebenginepage_p.h tests/auto/quick/qmltests/data/TestWebEngineView.qml Change-Id: Id2acc92e8d0364bdaaf5a63ea2d2cb9cd533ade3
| * Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2018-01-161-26/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/web_contents_adapter.cpp src/webengine/api/qquickwebengineprofile.cpp src/webenginewidgets/api/qwebengineprofile.cpp tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: I56c093ebab5ee8b577783ce71761719159cd3ddd
| | * Protect QML profiles as well as coreAllan Sandfeld Jensen2018-01-151-27/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Moves QWebEngineBrowserContext to core and makes use of it from both widget and qml. Change-Id: I34748f302b0515b11b5831690d28478dfa6a852b Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2018-01-081-0/+9
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/api/qwebengineurlrequestjob.cpp src/core/browser_context_adapter.cpp src/core/renderer/user_resource_controller.cpp src/core/web_engine_context.cpp src/webenginewidgets/api/qwebenginepage.cpp Change-Id: I5278e5e22e1776d42975fc94d70ff8ca4f81fb9a
| | * Fix access after free on shutdownAllan Sandfeld Jensen2018-01-051-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After we keep around the browser-context after the profile is deleted it was keeping pointers to deleted objects and would sometimes use them on shutdown. Change-Id: Ib67d0ee0b27cb1a1b64d9b8b4c348ed418b9bbc3 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | | Deprecate download typeJüri Valdmann2018-01-021-1/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch '5.9' into 5.10Allan Sandfeld Jensen2017-11-011-8/+24
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/core_module.pro src/core/delegated_frame_node.cpp src/core/surface_factory_qt.cpp src/webenginewidgets/api/qwebengineprofile.cpp tests/auto/widgets/widgets.pro Change-Id: I92f3ef4eee779afef6c5381a7aa8b551417c1b17
| * Destruct BrowserContextAdapter together with WebEngineContext in widgetPeter Varga2017-10-271-8/+24
| | | | | | | | | | | | | | | | | | | | BrowserContext needs IO thread to be destructed properly. Without WebEngineContext dependency it would be destructed together with the corresponding QWebEngineProfile which can outlive the WebEngineContext. Task-number: QTBUG-62147 Change-Id: Ia34215f379c6c803499848bf009e25a64b5cdb98 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2017-09-291-0/+4
|\| | | | | | | Change-Id: I7094e85a7770303a2ae30baccbc484c04f33600e
| * Document that the Windows version in the user-agent might be wrongKai Koehne2017-09-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium uses GetVersionEx() to determine the Windows version that is reported in the default user agent. GetVersionEx() however always reports "Windows NT 6.2" for newer Windows versions, unless the executable's manifest file marks the newer version as supported. Since this is a common question we document this in the httpUserAgent accessors. Task-number: QTBUG-56472 Change-Id: I4698cd659f5552b92ef925c198f39326fcb936f3 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Add https to list of internal schemesViktor Engelmann2017-08-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Since https is an internal scheme, it should be in this list of internal schems. This also prevents custom custom QWebEngineUrlSchemeHandlers to register "https". Although it is debatable whether this is necessary, https should be held to at least the same security standards as http, which is also in that list. Task-number: QTBUG-56894 Change-Id: I83d0130541fe3b5831bf29d429bad89a8fc5408c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Reorder documentation for QtWebEngine dictionary discoveryFlorian Bruhin2017-08-041-28/+2
| | | | | | | | | | | | | | | | | | | | This also adds documentation for QTWEBENGINE_DICTIONARY_PATH from my previous change. Change-Id: I85cd7476c095d5427e2db3a909449838a2362b81 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add method for triggering downloadsFlorian Bruhin2017-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The method download(const QUrl &url, const QString &suggestedFileName) already exists in WebContentsAdapter. It is now accessible through a corresponding method in QWebEnginePage. [ChangeLog][QtWebEngineWidgets][QWebEnginePage] New QWebEnginePage::download() method to start custom downloads for a web page. Task-number: QTBUG-55944 Change-Id: I185ec69c1668b377a129bc9fc09963278e52de1e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Don't disable local storage for offTheRecord profilesFlorian Bruhin2017-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium has local storage enabled in icognito windows, and simply doesn't persist it to disk. QtWebEngine seems to do the same when local storage is enabled in an off-the-record profile, so there's no reason to disable it by default. This also matches the behavior in Chromium (and Firefox, but not Safari). [ChangeLog] HTML 5 local storage is now enabled by default (but residing in memory) in off-the-record profiles. Change-Id: I0cb7e946575a53471ffed9d3324b3ae4c2e80eee Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Implement pause and resume action in Download ItemsAllan Sandfeld Jensen2017-06-231-5/+0
|/ | | | | | | | | 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>
* Fix crash on exit with url-request interceptorsAllan Sandfeld Jensen2017-05-081-0/+4
| | | | | | | | | | If the interceptor is the child of the profile, they will be deleted with the API profile which is before the underlying browser-context, they should therefore be unset from the browser context first. Task-number: QTBUG-60236 Change-Id: I2954e8106863b8b421ef166f6bf8fa79240c95ee Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Rename WebCoreVisitedLinksManager to VisitedLinksManagerQtAllan Sandfeld Jensen2017-03-261-1/+1
| | | | | | | | Rename to follow our standard naming. This class was one of our oldest and probably predates our standard naming convention. Change-Id: I32dfbad9611b789ad13114d9692b07045806f7c0 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Update spellcheck api to support multiple languagesMichal Klocek2016-10-291-10/+10
| | | | | | Task-number: QTBUG-56074 Change-Id: I2a66e91dd4ed1026e5ab2539cfd3f9094263b48c Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix spellchecking for macOSAlexandru Croitor2016-10-171-3/+23
| | | | | | | | | | | | The change fixes spellchecking to work on macOS. A new WebEngine configure option is available to allow spellchecking on macOS to use either Hunspell like the other platforms, or the native spellchecker that comes with the OS. The default is to use Hunspell. Task-number: QTBUG-53135 Change-Id: I3e45b2e0d728b1bf2659c35f3d0a042b0ecd6239 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>