summaryrefslogtreecommitdiffstats
path: root/examples/webenginequick/quicknanobrowser
Commit message (Collapse)AuthorAgeFilesLines
* Add QWebEnginePermission and rewrite permissions APIKaloyan Chehlarski7 days2-35/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the addition of permission persistence, it's now important for us to have an API for querying previously granted/denied permissions, so that they can be revoked at a later point. This change does the bulk of the work to get us there, by introducing a new type representing a single permission for a given URL/Feature pair. This type holds no information about the permission's state; it is simply an accessor object which allows its user to query the current status of the permission, grant/deny it, or reset it back to its initial state (so, delete it from storage). This provides application developers an easy way to store/modify lists of permissions without having to define their own custom types. A subsequent change will expand the API to provide a list of all permissions for a given profile. The current API (in QWebEnginePage and QQuickWebEngineView) has been marked as deprecated, but has not been disabled to ensure a smooth transition for developers. [ChangeLog][QtWebEngineCore][QWebEnginePage] Deprecated old permissions API [ChangeLog][QtWebEngineQuick][WebEngineView] Deprecated old permissions API [ChangeLog][QtWebEngineCore] Added new API for querying and modifying website permissions. [ChangeLog][QtWebEngineQuick] Added new API for querying and modifying website permissions. Pick-to: 6.8 Change-Id: I8661cdc26bbd6dcde6403d29cc083bcea1a49ccc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Allow checking whether certificate error comes from a page resourceKaloyan Chehlarski2024-05-172-3/+11
| | | | | | | | | | | | | | | | | | | | | | Currently, all certificate errors are handled the same way, regardless of whether they come from the main frame or from an outside resource. On the user side, this means that all certificate errors for resources trigger a pop-up claiming the page is unsafe. Other browsers do not do this, and instead automatically reject bad certificates for resources. This change extends the QWebEngineCertificateError API to allow querying for whether the error comes from the main frame, or from a resource. This information is already supplied by Chromium, but we previously just ignored it. With this, application developers may now choose to auto-reject resource errors just as Chrome does. The simple and quick nano browser examples have been updated to reject certificate errors coming from a page resource. Task-number: QTBUG-92009 Change-Id: Id38b21f569318d7a83332d4ba69cb27d14b53430 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Correct license for examples filesLucie Gérard2024-04-091-1/+1
| | | | | | | | | | | | | Example takes precedence over build system file type. According to QUIP-18 [1], all examples file should be LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I558c6f409a480835d335101577ae633194b0559d Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Add local fonts permission notification to Quick Nano Browser exampleKaloyan Chehlarski2024-03-221-0/+3
| | | | | | | | | This change adds the relevant permission pop-up text to the Quick Nano Browser example for the local font access API. Task-number: QTBUG-121320 Change-Id: I0347f028301fe57cfece7962798398a0dc9978e5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix warning in QuicknanobrowserSzabolcs David2024-03-141-7/+1
| | | | | | | | qrc:/WebAuthDialog.qml:115:21: Unable to assign QString to QRectF Change-Id: I88e2f6c3da745d0f8b9663c40ae895cbbdfd8ad9 Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add granular permission for clipboard-read/writeMoss Heim2024-03-111-0/+3
| | | | | | | | | | | | | | | Previously, permissions for clipboard access could only be managed through the JavascriptCanAccessClipboard and JavascriptCanPaste settings. This change allows copy/paste to be handled the same way as notification and geolocation permissions. If both JavascriptCanAccessClipboard and JavascriptCanPaste are enabled, permissions will be granted unconditionally without a feature request being made. Fixes: QTBUG-77450 Change-Id: I383e27e244ced3d6b7988644e38d2307c6267f76 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add setting method to set image animation policyAnu Aliyas2024-03-071-1/+42
| | | | | | | | - added a method to set image animation policy in QWebEngineSettings Fixes: QTBUG-86154 Change-Id: I8b3ab6067f9cff4219b0da90bb8601406cb98e24 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* QWebEngineWebAuthUxRequest: add RegisterEnumClassesUnscoped for QMLMarc Mutz2024-03-041-28/+28
| | | | | | | | | | | | | | | Adding the scope later is a SiC (Type A, but still) change, so better do it now when we introduce the class. Found in API-review. Amends 605b0b3dcce24ff82c1e7a1ab3db7dace9668b81. Pick-to: 6.7 Change-Id: I4f399beed4a7a817c3f58e5864ed56b3a223a116 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Update QWebEngineWebAuthUxRequest based on 6.7 API review commentAnu Aliyas2024-01-173-38/+38
| | | | | | | | | | | - Modified WebAuthUXState as enum class - Renamed QWebEngineWebAuthUXRequest as QWebEngineWebAuthUxRequest - Renamed QWebEngineWebAuthPINRequest as QWebEngineWebAuthPinRequest - Replaced all occurrence of UX and PIN with Ux and Pin respectively Fixes: 6.7 Change-Id: Iaf0b4c93e0dfa3508a604f7d6562c4401ff800af Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Modify copyright format in qt_attribution.jsonLucie Gérard2023-11-221-9/+9
| | | | | | | | | Multiline copyright entries are entered via string array. Task-number: QTBUG-111873 Pick-to: 6.5 6.6 Change-Id: I1b90e5333505227db66bc25d3baba8311afda37d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Add initial internal version pageMichal Klocek2023-08-111-1/+1
| | | | | | | | | | | | | | | | | We kept urls in examples to point to company website. However this site is heavy to load and moreover it changes overtime leaving example screenshots obsolete. Introduce internal qt version web ui page which will be default page for examples and which displays basic information and can work offline. For start show version info and command line options for chrome://qt Pick-to: 6.6 Change-Id: I0271ce6e7b152efe4942a6240b0c74ba382d5fcc Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add NSCameraUsageDescription and NSMicrophoneUsageDescription to plistsMichael Brüning2023-08-112-1/+12
| | | | | | | | | | | | | | | Quick Nano Browser and Simple Browser need this to be able to use the camera and microphone on macOS. Also document the need for signing the applications in the examples documentation. Pick-to: 6.6 Task-number: QTBUG-114939 Change-Id: I7a260a7ec62138fec8f7b4d6c1f2009eee9004d6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Doc: Update example category namesKai Köhne2023-08-101-0/+1
| | | | | | | | | | | | | | | | WebEngine examples are generally added to the new 'Web Technologies' category - only Nano Browser remains also in the 'Application Examples' category. The 2 Qt PDF examples are placed in the 'Graphics & Multimedia' category. This is not ideal, but from the existing categories the arguably best matching one. Pick-to: 6.5 6.6 Task-number: QTBUG-115174 Change-Id: I3824272f62a4940f91041c8694fd2a06929863ed Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix compilation issue on MAC OS with -debug-and-release configure optionAnu Aliyas2023-08-011-1/+7
| | | | | | | - Updated the application's path for code signing. Change-Id: I8469d573ba5f952d02734bc75e33b34f0c6e4494 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix geolocation permissions to use new Qt Permissions APIMichael Brüning2023-07-262-1/+46
| | | | | | | | | | | | | | | QtPositioningHelper now uses the Qt Permissions API. Also fixup the examples Simple Browser, Quick Nano Browser and Maps to use the right key on macOS and sign the application as part of the build process Moves the Geopermission auto tests to manual tests for webenginequick and webenginewidgets on macOS. Pick-to: 6.6 Fixes: QTBUG-114939 Change-Id: Id6771889f20c866d2fcdbb477dbbb7da30367043 Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Support FIDO2 user verificationAnu Aliyas2023-07-125-0/+321
| | | | | | | | | | | - Implemented AuthenticatorRequestClientDelegateQt support to handle authenticator requests. - Added FIDO user verification and resident credential support Fixes: QTBUG-90938 Fixes: QTBUG-90941 Change-Id: I6367791e1e9e8aaac27c376408377f838832f426 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add Quick Nano Browser to Application ExamplesKimmo Leppälä2023-06-191-0/+1
| | | | | | Pick-to: 6.5.2 6.5 6.6 Change-Id: Ia6f1950425d078fbcf4b5e212e5cc983544f3397 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add Windows 10 compatible manifest to examplesMartin Negyokru2023-06-163-0/+29
| | | | | | | | | | | | This manifest is required for User-Agent to report the correct Windows versions. Document Windows App Manifest in platform-notes and mention it in the httpUserAgent documentation. Pick-to: 6.6 Fixes: QTBUG-63021 Change-Id: Ie3896c50a0a912742e8d1a0dc20f3305b343d3f4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix quicknanobrowser tab closingMartin Negyokru2023-06-021-1/+0
| | | | | | | | | | | Calling TabBar.removeItem(Item item) with an integer results in an exception in the qml engine making the tabs not closable. 'removeItem' is called twice on the same item/index. Remove the wrong call. Pick-to: 6.5 Change-Id: Ie46794e219e82b956b615fa5cbb5dfe745598901 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* QuickNanoBrowser: Make FindBar visible in dark modePeter Varga2023-05-171-0/+14
| | | | | | | Pick-to: 6.5 Change-Id: Iec4f3db0a6dad1eb040e44b09bc0b0000714ecdb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* QuickNanoBrowser: Switch to Fusion stylePeter Varga2023-05-173-3/+3
| | | | | | | | | | | | | | | Since Qt 6, the default Qt Quick Controls style is native style on Windows and macOS. Since Qt 6.5, there is a warning to not to customize native style: "QML QQuickItem: The current style does not support customization of this control ..." Use non-native Fusion style instead, which appearance still resembles the native style and is customizable. Pick-to: 6.5 Change-Id: Ifadd74a152b739461f2ad7ef1cb9763a2974b492 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QuickNanoBrowser: Add feature permission request handlingPeter Varga2023-02-022-6/+98
| | | | | | | Pick-to: 6.5 Change-Id: Ia0d8bffa419174234e78e1359871e0dfa36b1636 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QuickNanoBrowser: Remove usage of Quota Permission Request APIPeter Varga2023-02-021-7/+0
| | | | | | | | | This amends commit 8fd7140082e3a752ca80882a29128ffc12d12fa4 Pick-to: 6.5 Task-number: QTBUG-56354 Change-Id: I82803cf9bfab1ed5a07494ecce86722b634c204c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QuickNanoBrowser: Remove deprecated Qt.labs.settingsPeter Varga2023-02-021-1/+1
| | | | | | | | | | | | Fixes deprecation warning: qrc:/BrowserWindow.qml:35:5: QML Settings: The Settings type from Qt.labs.settings is deprecated and will be removed in a future release. Please use the one from QtCore instead. Pick-to: 6.4 6.5 Change-Id: Ie027b243a312f148f72adfd6e68ce0f8d6e6d62c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Suppress the QTP0001 policy warningAmir Masoud Abdol2023-01-271-0/+1
| | | | | | Pick-to: 6.5 Change-Id: If10e6c259d73dd1e09c4ddac0b297b856fb13502 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Disable WebEngineContext dump by defaultPeter Varga2023-01-191-0/+2
| | | | | | | | | | | | | Keep it enabled for simplebrowser and quicknanobrowser examples. Also add documentation how to enable it. [ChangeLog][WebEngineCore] Disabled WebEngineContext dump by default. Fixes: QTBUG-109040 Pick-to: 6.5 Change-Id: I4bd3c0e9eb532771f9b455863324e9dacaae884a Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix quicknanobrowser's popup windowMartin Negyokru2022-12-091-1/+1
| | | | | | | | | | Remove Qt.WindowStaysOnTopHint flag from nanobrowser's BrowserDialog. It makes the window immovable. Pick-to: 6.4 Fixes: QTBUG-106816 Change-Id: I21538d78360de0a422eec02ce89a465bcc306a8b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Mention WebSockets in docsSzabolcs David2022-11-031-0/+2
| | | | | | | | | | | | | | | | QtWebChannel has an example for a use case of HTML web sockets and connectivity of the native side of application. We don't need to create a new example of our own by mentioning this. However, the chat client application uses JS libraries served from remote, so we have to enable LocalContentCanAccessRemoteUrls setting to make it work out of the box in WebEngine example browsers. Desktop Chrome works the same way by default. Task-number: QTBUG-106505 Change-Id: I9020d0a09a88de16d32af063aee5d55c9837f484 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Polish the nano browser exampleFriedemann Kleint2022-09-0810-30/+54
| | | | | | | | | | | - Use QCommandLineParser - Fix the organization name - Use modern QML type registration (Utils as a singleton) instead of context properties Pick-to: 6.4 6.3 6.2 Change-Id: Ibbe93dffd685ddd2e5f2d01852e006c4c47d9713 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-261-1/+1
| | | | | | Task-number: QTBUG-105718 Change-Id: I2ad190e5536cdbdc8d2656e61892545d66911a02 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add license headers to cmake filesLucie Gérard2022-07-071-0/+3
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I118bd63694cfe2c9a413af4a38828a31727f8e86 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-229-418/+18
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I869ffda1080e283f231eb0dc4477b260f2054d99 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Improve examples CMakeLists.txtKai Köhne2022-02-251-11/+5
| | | | | | | | | | | | | | | | | - Remove "# generated from xyz.pro" comment from pro2cmake - Remove automatic use of CMAKE_AUTORCC - Only opt into CMAKE_AUTOUIC if .ui files are involved - Remove explicit setting of CMAKE_INCLUDE_CURRENT_DIR - Combine multiple find_package(Qt6 ... calls) - use REQUIRED COMPONENTS - sort components alphabetically - Fix wrong indentations - Use (only) one empty line after multi-line commands Pick-to: 6.3 Change-Id: I09083474432ce171e8ee1e28120b062f2ef3c052 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Remove OTHER_FILES from quicknanobrowserMichal Klocek2021-12-021-7/+0
| | | | | | | | | Refereed resources are already referenced by qrc file. Fixes: QTBUG-71277 Pick-to: 6.2 Change-Id: Ibaad55aba529c87b8c8dba46bd3b1a3d7a819960 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Minor. Cleanup qt6_add_resources usageMichal Klocek2021-10-281-2/+2
| | | | | | | | We should not use qt6 prefixed functions in examples. Pick-to: 6.2 Change-Id: Ibf2618ef4f64b560decb219527d619aad680f216 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Fix broken attributions to the Public DomainLuca Di Sera2021-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | The attributions generated trough `qtattributionscanner` support generating links to SPDX licenses. Four such attributions used a `LicenseId` of `DocumentRef-PublicDomain`, which is a non-existent license. Indeed, the SPDX project seems to shy away from making a single license representing all Public Domain attributions, preferring to make a database entry for each Public Domain attribution. To avoid the broken link, such attributions were modified to use a dejacode LicenseId, which has a catch-all Public Domain entry, as suggested by Kai Köhne. Task-number: QTBUG-96127 Pick-to: 6.2 Change-Id: I88e0048c08d6099521e44e74ad7f0e8b3d77b907 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Do not require widgets for quick examplesMichal Klocek2021-09-271-7/+1
| | | | | | | | | | | We needed widgets to get qqc1 styling, since we now use only qqc2 drop that requirement. Fixes: QTBUG-96771 Task-number: QTBUG-95367 Pick-to: 6.2 Change-Id: I7338cd04885069169fef1c4bca17e0777b11de8c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Rename Quick examples' folder from webengine to webenginequickBalazs Egedi2021-09-1319-0/+1853
Fix webengine directory path in project files and comments Pick-to: 6.2 6.2.0 Change-Id: I06ed9ee41111e7135fa9feb152ad2a5eb2262b76 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>