summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebengineprofile.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Doc: Describe spellchecking feature in overviewsLeena Miettinen2016-09-201-0/+5
| | | | | Change-Id: I1164a505752d37a31006175dd6a3e6555b973e20 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Add back spellchecking supportMichal Klocek2016-07-021-0/+61
| | | | | | | | | | | | | | This reverts commit: * d364c05de52f9ab39034e56cac4e0a7981dc541d * e507f140b70f464fb970d2f94357ac588dcc4f03 Moreover it fixes shut down of keyed services, updates versioning of and fixes spellcheck unit test context menu request, which otherwise fails on windows. Change-Id: I9bfc589544cb969abd6d2d7af69531b4c5c907b7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add a DownloadType enum property to WebEngineDownloadItemAdam Kallai2016-06-221-0/+1
| | | | | | | | | | | 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>
* Introduce QWebEnginePage::saveJoerg Bornemann2016-06-161-1/+2
| | | | | | | | | Add the convenience method QWebEnginePage::save for saving pages without the need to explicitly handle download requests. Task-number: QTBUG-51798 Change-Id: I8910ce8cb7c9370d72f2b209c4d2de07c614f6d6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove spellchecking supportMichal Klocek2016-05-061-61/+0
| | | | | | | | Spellchecking API needs a bit more reviews and love. Current API is not intuitive and partly broken. Change-Id: Ie9cd371f38cca2f6b3f56a8699ad874cd332c318 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Doc: Document how dictionaries are loadedMichal Klocek2016-05-041-0/+16
| | | | | Change-Id: I366e35b6de0a46be648de3130eb7d8585fc1a694 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove availableDictionaries from spellcheck apiMichal Klocek2016-05-041-17/+0
| | | | | | | | | | | This method is broken, since SpellcheckerService is lazily initialized and dictionaries might be not loaded yet. Moreover there is a missing implementation on mac. Instead log warning when SpellcheckService can not load dictionary. Change-Id: Ifa2e769d83307543fa6cdf529475e9ab980022f0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-04-251-5/+4
|\ | | | | | | Change-Id: I329397621f19ba3890be5daf44a6bb2d668ad2d8
| * Remove direct access BrowserContextAdapter's customUrlSchemeHandlersAllan Sandfeld Jensen2016-04-201-2/+1
| | | | | | | | | | | | | | | | Remove the non-const reference access to customUrlSchemeHandlers, and replace the last remaining use-case with clearCustomUrlSchemeHandlers. Change-Id: If9077e3900593d7f9520fb9bbcef2f1aa3307eac Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * Switch BrowserContextAdapter to QSharedPointerAllan Sandfeld Jensen2016-04-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | BrowserContextAdapter is not a form of shared data, and using QExplicitSharedDataPointer on it as always been a misuse of the class. Instead we should switch it to QSharedPointer, which also allows us to use QWeakPointer. Change-Id: I8eb489b4a12d3fdddcde55821be294814a156a9d Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Update spellchecker APIsMichal Klocek2016-04-181-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * marks new properties in QQuickWebEngineProfile as FINAL * removes QT_NO_SPELLCHECK from API headers * renames spellCheckLanguages() to availableDictionaries() * removes "togle spellcheck" methods and actions * use WEBENGINE_CONFIG instead of CONFIG for disable the feature at compile time: WEBENGINE_CONFIG+=no_spellcheck Done-With: Peter Varga <pvarga@inf.u-szeged.hu> Task-number: QTBUG-52371 Change-Id: I8c8eff497b9e7afe0cec2edc97dec248151487f2 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Merge branch '5.6' into 5.7Allan Sandfeld Jensen2016-04-111-1/+4
|\| | | | | | | Change-Id: I53645ee5405b1c43807123fd3c196e314cfd1ce9
| * Doc: Mark QWebEngineProfile::setRequestInterceptor as new in Qt 5.6Kai Koehne2016-03-311-0/+1
| | | | | | | | | | Change-Id: I93f68098718d7f0303accabc9def49ff83e65ca2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
| * Doc: Fix documentation about cookie storesKai Koehne2016-03-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove misleading "singleton, if one has been set" from the accessor's documentation. Also link to the accessor's from the class documentation, and remove mentioning of cookie store as something that can be accessed for an individual page. Finally, mark QWebEngineProfile::cookieStore as new in Qt 5.6. Change-Id: Ia20ca0ef45a9a15de0052f7ceb7f59d454c70fdc Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Doc: Document HttpCacheType::NoCacheKai Koehne2016-04-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix src/webengine/api/qquickwebengineprofile.cpp:78: warning: Undocumented enum item 'NoCache' in QQuickWebEngineProfile::HttpCacheType Also mention that the value was added in Qt 5.7. Change-Id: Ie3f139c473b6d36a74fdc094154e123425e7bef1 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-03-081-6/+28
|\| | | | | | | Change-Id: Ieab3c4a6d16b1d7b7c0243ff8898f81807e7b1fc
| * Doc: Improve web engine profile class descriptionsLeena Miettinen2016-02-291-6/+28
| | | | | | | | | | | | | | | | Add information about the most important methods and properties. Change-Id: I41ae039a0cc6084b62b492560def5eed7d8d3742 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Rename UserScriptController/Host to UserResourceController/HostSzabolcs David2016-02-101-1/+1
| | | | | | | | | | | | | | These classes can operate user stylesheets too. Change-Id: Ia283af92e52a822b26003ff65e0e7dc391b0904d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add spell checker supportMichal Klocek2016-02-011-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Integrate chromium spell checker: * add spellchecker and dependencies to build * underline misspelled words in html text areas * right-click context menu shows up to 4 options to correct the misspelled word * toggle spell check from context menu * add new qml and widget api calls to qwebengineprofile to enable/disable spell check, select spell check language, get list of supported languages/dictionaries * register new qml spell check properties for QtWebEngine 1.3 * CONFIG+="no_spellcheck" to remove spellcheck support Change-Id: Ie61434ab9493597d7759a6f33794f6859c4e3a4c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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>
* | Extend HttpCacheType with NoCache optionSzabolcs David2016-01-271-0/+1
| | | | | | | | | | | | | | | | | | Add option to disable cache with passing NULL as cache backend. It behaves the same way as using HttpCache::set_mode(DISABLE), but saves some memory without instantiating backend factory. Change-Id: I1565cc773eda21a6bc73eebe14ab8046252a7755 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Merge branch '5.6' into devAllan Sandfeld Jensen2016-01-121-0/+1
|\| | | | | | | Change-Id: I4272eb59cac08c69eaa58dd4d94debf1b8c5cf78
| * Make the MIME-type of downloads availableAllan Sandfeld Jensen2015-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 function to clear data from the cacheSzabolcs David2016-01-061-0/+11
| | | | | | | | | | | | | | | | | | It marks the entries of the current cache backend for deletion and starts to remove them. Task-number: QTBUG-48177 Change-Id: I85ec25048ff5429976f1b2dcacd74666bdbe6624 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Add web action for saving the current web pageJoerg Bornemann2015-12-111-0/+9
|/ | | | | | | | 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>
* Rename QWebEngineCookieStoreClient to QWebEngineCookieStoreMichal Klocek2015-12-011-4/+4
| | | | | Change-Id: I8f9a4c5c155a65ede24908799218fd867db0767c Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Rename url scheme handler's destroyed signalAllan Sandfeld Jensen2015-12-011-3/+3
| | | | | | | | Make the signal distinct from the QObject destroyed signal and make sure it is not documented and follows private signal naming. Change-Id: If10a6e7fcee5e9ea4d3ed12ddb8e6ff3f1170adc Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Improve documentation for QWebEngineScriptKai Koehne2015-11-051-2/+4
| | | | | Change-Id: I9274a3cacaa04529152a5d827c47cf6fc831df19 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-281-1/+1
|\ | | | | | | | | | | | | Conflicts: src/3rdparty Change-Id: I49acdd9b5ca94f2807b0c13a97f508a67f1c5750
| * Set off-the-record to true as documentedAllan Sandfeld Jensen2015-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | The API had no way of setting off-the-record, because the constructor meant for it set it to false. The patch fixes the constructor and adds basic API tests for the QWebEngineProfiles. Change-Id: I407eb4a4b0524b6c4eb944d17d744620dd9db6fb Task-number: QTBUG-48724 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Do not require to subclass/install QWebEngineCookieStoreClientKai Koehne2015-10-191-13/+0
| | | | | | | | | | | | | | | | | | The class has only setters and getters, except for the virtual acceptCookie method. By replacing this method with a setCookieFilter callback we can avoid the need of users to subclass the client. Change-Id: Id78c01fc103b8d9cc267594527239b598e8975f1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Decouple scheme and url scheme handlerAllan Sandfeld Jensen2015-10-161-13/+26
| | | | | | | | | | | | | | | | | | Remove the scheme from the url scheme handler constructor, this way the same handler can handle multiple schemes, the API look more natural and we can get rid of the private class. Change-Id: I33906b8a5ea51641e28a53f93f4feb1472c24baf Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Fix compilation with latest qtbaseKai Koehne2015-10-081-2/+2
| | | | | | | | | | Change-Id: I1040dab62b7c795dbaf3899304501917993b06d6 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Remove unnecessay delegation over CustomUrlSchemeHandlerAllan Sandfeld Jensen2015-10-061-9/+5
| | | | | | | | | | | | | | | | | | | | | | With QWebEngineSchemeHandler in QtWebEngineCore, we do not need the indirection and delegation CustomUrlSchemeHandler provided. This means the class can be removed and we can also store the handlers directly in BrowserContextAdapter and save a copy of the installed handlers in the QWebEngineProfile. Change-Id: Iabb5cc9d364c2f2a879bc77bfb2ff14b3c2ff640 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Fix assert on deleting installed custom URL scheme handlerAllan Sandfeld Jensen2015-09-301-4/+4
| | | | | | | | | | | | | | | | | | | | When the QObject::destroyed signal is emitted the inherited class parts have already been destroyed and thus it is no longer a QWebEngineUrlSchemeHandler and qobject_cast will return 0, which is asserted against. Change-Id: I7130c60a26088067930499a30e0081ed297a92d9 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Clarify unit of [set]HttpCacheMaxSizeKai Koehne2015-09-221-2/+2
| | | | | | | | | | Change-Id: I5db2aebf3cd300344bdafe8bba4169d54a0f3c24 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Improve WebEngineProfile documentationKai Koehne2015-09-141-2/+3
| | | | | | | | | | Change-Id: Ia7b160444a6c8902c6174d9859b3989a9442bc2e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* | Doc: fix \sa linksLeena Miettinen2015-09-091-2/+2
| | | | | | | | | | | | Change-Id: I522918064ef8139eff4efa0461030baeb7083b76 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Move custom URL scheme handlers to coreAllan Sandfeld Jensen2015-08-271-17/+51
| | | | | | | | | | | | | | | | Makes the custom URL scheme handler API public, and moves it to core so that it may be shared with the QQuickWebEngine API. Change-Id: I745cb088df6f4cd11b1ac7c8c3c76f112032cb38 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Add documentation for cookie API and request interception in coreAndras Becsi2015-08-201-4/+15
| | | | | | | | | | | | Change-Id: I6908ff3da9e0c78c3cf3d9b27d6c532029423d24 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* | Doc: clean up QWebEngineProfile docsLeena Miettinen2015-08-181-29/+45
| | | | | | | | | | | | | | | | | | - Add missing documentation - Remove unnecessary \brief, \param, and \return commands - Edit for language and style Change-Id: I6b338834e5695cf135874f80e71151a5f5dd54e7 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | add API to set the Accept-Language HTTP request-header fieldJoerg Bornemann2015-08-041-0/+22
| | | | | | | | | | | | | | | | | | | | Add methods to set the Accept-Language field in QWebEngineProfile and QQuickWebEngineProfile. Task-number: QTBUG-47412 Change-Id: Ifa376bb3551fdc1fb3d68279d734b7f7735782fc Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Add API for intercepting url requestsAndras Becsi2015-08-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is adding a QWebEngineUrlRequestInterceptor interface that can be subclassed to observe or intercept all resource requests making it possible to implement browser features like adblocking and setting custom request headers for url requests. The interceptRequest virtual function is executed on the IO thread. This patch also includes a unit test for the testable API parts. Change-Id: Ibe740fc55551a9a5da40794088ccb6d03d913631 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Martin Rotter <rotter.martinos@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-06-291-5/+5
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/webenginewidgets/api/qwebenginepage.cpp Change-Id: Idb33c92bd53fab76eee8fedb542dbf5e4a10f9e6
| * Last minute API review cleanupPierre Rossi2015-06-121-5/+5
| | | | | | | | | | | | | | | | | | The getters in QWebEngineDownloadItem were not const. The script collection in QWebEngineProfile was passed by reference, which is not idiomatic of Qt. Change-Id: I9b4218b407288b91a726a711bd2a7e1c1167d99a Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Add QWebEngineCookieStoreClient core APIAndras Becsi2015-06-161-0/+13
|/ | | | | | | | | | | | | | | | | This class or its subclass can be set on the QWebEngineProfile and its API enables intercepting Chromium's cookies, setting and deleting cookies in the cookie store. These functions are asynchronous so if the result of the task is needed the user can provide a callback which will be run on the calling thread when the requested operation finishes. This does not include a hook for QQuick layer yet, there we have to figure out what the most convenient way is from a developer's perspective. Change-Id: I6a3af071883ce632df7a2fb952da93f306ac3fe2 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>