summaryrefslogtreecommitdiffstats
path: root/src/webenginequick
Commit message (Collapse)AuthorAgeFilesLines
* Mark extensionManager as a constantHEADdevAllan Sandfeld Jensen13 hours1-1/+1
| | | | | | Pick-to: 6.10 Change-Id: I93acb15935ac43baf72006e2e563c5485f7e173d Reviewed-by: Fabian Kosmale <[email protected]>
* Associate permissions with framesKaloyan Chehlarski17 hours3-69/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, permisions were associated with the originating WebContents, as the PermissionManager API uses those in its function calls. This is insufficient, however, as it results in iframes not receiving the correct permissions (because they were instead granted to the root frame instead. This change modifies the internals of PermissionManagerQt to use GlobalRenderFrameHostTokens, and modifies relevant functions across the codebase to pass those around instead of WebContents. Media and mouse lock permissions now also query the permission manager before issuing a request, which avoids some cases of the same request being sent multiple times in a row. As a side effect, the behavior of non-persistent permissions (as well as the behavior of ALL permissions when running in AskEveryTime mode) is standardized so that a permission is remembered as long as the associated frame is alive. Fixes: QTBUG-134637 Fixes: QTBUG-135787 Pick-to: 6.10 6.9 Change-Id: I650e3328ef3830d06206acafc3305566d3a10d86 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Export qml extension types in webenginequickAllan Sandfeld Jensen4 days1-0/+24
| | | | | | | | From API review. Pick-to: 6.10 Change-Id: Ibcdf7780d1c03f601a703b35118d0b439e4df62c Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Fix case of QML webEngineScript documentationAllan Sandfeld Jensen4 days1-9/+9
| | | | | | Pick-to: 6.10 6.9 6.8 Change-Id: Ia7e65f9050a1e57a3a2c7da69088e68fc7874ef1 Reviewed-by: Ulf Hermann <[email protected]>
* WebEngineQuick: Expose QWebEngineClientHints to QMLOlivier De Cannière6 days1-0/+10
| | | | | | | | | | | | The type already had registration macros but because the header was added to a non-QML module these didn't come into effect. Add a foreign type to register it properly. Task-number: QTBUG-138589 Pick-to: 6.10 6.9 Change-Id: I5a960cf77b71ff4f2b7ddc03b1583029b86d84bc Reviewed-by: Ulf Hermann <[email protected]>
* WebEngineQuick: Expose QWebEngineDesktopMediaRequest to QMLOlivier De Cannière7 days1-0/+9
| | | | | | | Task-number: QTBUG-138589 Pick-to: 6.10 Change-Id: If8eb6447c3380efa03258f478da68feddccd1988 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Add PersistentCookiesPolicy::OnlyPersistentCookiesMoss Heim10 days3-1/+11
| | | | | | | | | | | This new policy prevents session cookies from being saved to disk even for crash recovery purposes. Persistent cookies are still stored. As a drive-by add a missing data row in a QWebEngineProfileBuilder test Task-number: QTBUG-135799 Change-Id: I55364aa96c07ce83d3f30d812450421354310d72 Reviewed-by: Michal Klocek <[email protected]>
* Stop using private V4 APIAllan Sandfeld Jensen14 days1-13/+7
| | | | | | | | Everything we need have long been available through public API. Pick-to: 6.10 6.9 6.8 Change-Id: Ifc3925971e8b81852ad42d5dd535ffa9eec1b37b Reviewed-by: Michal Klocek <[email protected]>
* Add setting to trim accessibility identifiersKaloyan Chehlarski2025-08-012-0/+27
| | | | | | | | | | | | | | | | | | | By default, Qt's accessibility code will provide an object's full accessible hierarchy inside the Identifier string that's passed to a screen reader or automation software. This may be undesirable for users who use WebEngine for automated testing. This change adds a new QWebEngineSetting that disables this behavior, and instead makes sure that the HTML 'id' attribute is passed cleanly to accessibility software. When there is no 'id' attribute, the default Qt behavior still applies, and the Identifier string is still the full object hierarchy. Fixes: QTBUG-134762 Change-Id: Ica0b626c05b5cdca0bad83280ba15183ff9480f6 Reviewed-by: Michael Brüning <[email protected]>
* Upgrade loading of ui delegatesMichal Klocek2025-08-013-58/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | Our loading ui delegates implementation dates back to Qt5 where we supported qquickcontrols1 with qquickcontrols2 overrides. Also it provided an unofficial way to customize the ui delegates by providing own qml files as we createed qml compnonents by loading qml files. This works fine if you have deployed ui delegates qml files on target systems. However, qt-cmake deployment scripts do not handle qml file deploment instead qml plugins are used. Therefore, drop the qml file based delegate creation and simply let the qml enigne load the module and create the component. Note we have now the proper delgates ui/request api to provide way to customize delegates, however provide still way of overriding delegates with own delegates module by setting environment variable QTWEBENGINE_UI_DELEGATE_MODULE. This varaible can contain the list of modules spearted by semicollon. Task-number: QTBUG-111907 Pick-to: 6.10 Change-Id: Ie79f863e75ea69f6a0e600c627ab111224b5e79c Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Remove FINAL marker on new propertyAllan Sandfeld Jensen2025-07-251-2/+1
| | | | | | | | | Not allowed any more. API review Pick-to: 6.10 Task-number: QTBUG-137478 Change-Id: I4559e3d00af0be46ec90bdcfff81a7b39d984bb8 Reviewed-by: Fabian Kosmale <[email protected]>
* Adaptations for Chromium 132Allan Sandfeld Jensen2025-07-141-1/+2
| | | | | | Pick-to: 6.10 Change-Id: Id2d09604201b2c007c76328f92bb4e0c0d802cae Reviewed-by: Michal Klocek <[email protected]>
* Fix crash if ui delegates are not deployedMichal Klocek2025-07-032-2/+7
| | | | | | | | | | | | | | | | In case delegate for touch handle can not be loaded bail out and simply return nullptr as TouchHandleDrawableQt works fine without delegate (guards against nullptr). Note all other dialog already bailout in case default delegate can not be loaded. Tested on bookworm with 6.8.3 Fixes: QTBUG-111907 Pick-to: 6.10 6.9 6.8 Change-Id: Ib509b63010888fa718f23148c06d973382cad428 Reviewed-by: Michael Brüning <[email protected]>
* Fix build with QtDeclarative 6.11Allan Sandfeld Jensen2025-06-181-1/+1
| | | | | | | | | getV4Engine() was removed, and never needed in Qt6. Pick-to: 6.10 Fixes: QTBUG-137854 Change-Id: I50f168bd7dae2523632705a0612450345dff5117 Reviewed-by: Ulf Hermann <[email protected]>
* Normalize signal/slot signatures 2025Marc Mutz2025-06-041-1/+1
| | | | | | | | | | | This is the result of running util/normalize on the code base. The following manual edits were needed: (none) Pick-to: 6.10 6.9 6.8 6.5 Change-Id: Ia59174aaf154559f7445e13d059723a282f75aae Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Add API for extension managementMartin Negyokru2025-05-292-0/+20
| | | | | | | | | | | | | | | Introduce QWebEngineExtensionManager and QWebEngineExtensionInfo. The manager has methods to load and install Chrome extensions from the filesystem. QWebEngineExtensionInfo provides information about a loaded extension. The current state of our js extension API support is very limited meaning most of the extensions downloaded from Chrome extension store won't work. Adding support for these APIs will be done in followup patches. Fixes: QTBUG-118452 Task-number: QTBUG-61676 Change-Id: I017ad5e8d2ba963afbd2f31ac36fee9451a951bd Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Add API for providing additional CA certificatesKai Uwe Broulik2025-05-273-2/+60
| | | | | | | | | | This allows to provide additional certificates that are considered when verifying a certificate. This is done by the cert verifier downstream of the platform-specific cert store. Fixes: QTBUG-50586 Change-Id: Ie90547f1013f22f994aaff536fadf906a44a88ef Reviewed-by: Moss Heim <[email protected]>
* CMake: Fix NO_PRIVATE_MODULE warningAlexandru Croitor2025-04-041-0/+1
| | | | | | | | | | | | | | Fixes the following warning: CMake Warning (dev) at cmake/QtModuleHelpers.cmake:1187 (message): Module WebEngineQuickDelegatesQml does not have private headers. Please add NO_PRIVATE_MODULE to its creation flags. Call Stack (most recent call first): cmake/QtScopeFinalizerHelpers.cmake:24:EVAL:1 (qt_finalize_module) src/webenginequick/ui/CMakeLists.txt:DEFERRED Change-Id: I936bba73933775f11946778799047045fc037d3b Reviewed-by: Michal Klocek <[email protected]>
* Avoid clipping of the popup window in webengine quickAnu Aliyas2025-03-271-2/+3
| | | | | | | | | | | Currently webenginequick uses a window as popup, and the contents are getting clipped with respect to the parent's boundary. To avoid this, set the transient parent instead of the parent. This is based on the documentation. Fixes: QTBUG-132794 Change-Id: I527ae55d130bc122c903a39738ffea5cec29eb90 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Fix QWebEngineDownloadRequest::pause()Szabolcs David2025-02-242-2/+2
| | | | | | | | | | | | | | Calling pause() (or any method which causes state update) in a directly connected signal handler of a download request causes an assertion fail in DownloadItemImpl::UpdateObservers() because it is protected from nested updates. Use QTimer::singleShot() to detach download requests and updates from the direct code path. Add auto test to check if pausing and resuming a download work. Pick-to: 6.8 6.9 Change-Id: Ia8c977a626fd0d39ca51df42984381a75cca2101 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Port to new Q_UNREACHABLE_RETURN()Marc Mutz2025-02-112-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator to convert sequences of Q_UNREACHABLE() + return into Q_UNREACHABLE_RETURN(), newly added to qtbase. const std::string unr = "unr", val = "val", ret = "ret"; auto makeUnreachableReturn = cat("Q_UNREACHABLE_RETURN(", ifBound(val, cat(node(val)), cat("")), ")"); auto ignoringSwitchCases = [](auto stmt) { return anyOf(stmt, switchCase(subStmt(stmt))); }; makeRule(stmt(ignoringSwitchCases(stmt(isExpandedFromMacro("Q_UNREACHABLE")).bind(unr)), nextStmt(returnStmt(optionally(hasReturnValue(expr().bind(val)))).bind(ret))), {changeTo(node(unr), cat(makeUnreachableReturn, ";")), // TODO: why is the ; lost w/o this? changeTo(node(ret), cat(""))}, cat("use ", makeUnreachableReturn)); a.k.a qt-use-unreachable-return. subStmt() and nextStmt() are non-standard matchers. Also made a manual scan to update the patch to 6.10. Pick-to: 6.9 Change-Id: Ic612e11dce9180f5e3e81b377985332e6f26bacb Reviewed-by: Ivan Solovev <[email protected]> Reviewed-by: Marc Mutz <[email protected]> Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* QQuickWebEngineProfile: make the new ctor explicitMarc Mutz2025-02-101-1/+1
| | | | | | | | | | | | | A QString is a not a faithful representation of a QQuickWebEngineProfile, so the constructor should be explicit. Found in API-review. Amends d472a95b3b2e7783ab1c42a5fb6406f7eebf1c60. Pick-to: 6.9 Change-Id: I8f9091933bd0ef56c59315c2e6247e780fa7dbf6 Reviewed-by: Michal Klocek <[email protected]>
* Add setting to enable back/forward cacheSzabolcs David2025-02-102-0/+26
| | | | | | | | | | Implement an option to speed up back/forward navigation with bfcache feature. (Disabled by default.) Fixes: QTBUG-131324 Change-Id: I5ddb45b6a23ef587e868162b26368f5bc4933742 Reviewed-by: Moss Heim <[email protected]> Reviewed-by: Peter Varga <[email protected]>
* Doc: Various punctuation fixesKaloyan Chehlarski2025-02-103-13/+12
| | | | | Change-Id: I65b22658eb46e2460e0bd8d82f528671b33fad66 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Doc: Various typo fixesKaloyan Chehlarski2025-02-101-1/+1
| | | | | | Pick-to: 6.9 Change-Id: I3255a89539d23393ca1d0d7ebc440fe7e088d859 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* QuickWebenginView: Fix crash when assessing m_profileCarl Schwan2025-01-311-0/+1
| | | | | | | | | | | | | | | | | | | | | Ensure the profile is initialized before calling m_profile, otherwise this will crash. This happens with the following code: WebEngineView { userScripts { collection: [ { injectionPoint: WebEngineScript.DocumentReady, sourceCode: scriptContent, worldId: WebEngineScript.UserWorld } ] } } Pick-to: 6.9 Change-Id: I9d2d626ea51fb619b32147d8883701b40eab6c6e Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* QQuickWebEngineProfilePrototype: Post API reviewAnu Aliyas2025-01-161-1/+1
| | | | | | | | | | The following changes are made based on the review comments: - Renamed the function argument of setStorageName(). The corresponding change in the source file is not needed, as it is using the current argument name. Change-Id: Id5a3bd5f1fe2b60ad522a76700edb9789e8546c8 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Rename JSTouchEventsEnabled to TouchEventsApiEnabledAllan Sandfeld Jensen2025-01-152-11/+11
| | | | | | | | | Api-review Pick-to: 6.9 Change-Id: I06c5400c50f30c7473bee8e82f9f63fad2875930 Reviewed-by: Michal Klocek <[email protected]> Reviewed-by: Peter Varga <[email protected]>
* Fix scaling and positioning of popup windows in WebEngineQuickMichael Brüning2025-01-112-9/+37
| | | | | | | | | | | | | | | | | When using QQuickItem::scale to scale up the UI, popups were misplaced when a WebEngineView was a child of this scaled item. After trying different approaches similar to other popups in Qt Quick, it turned out that the approach that we use to handle rotation can also be applied to handle scaled items. This also adds the handling of rotation and scale of items higher up the item tree. Pick-to: 6.8 6.9 Fixes: QTBUG-130608 Change-Id: If6b6c39113d0f07146d633e9d11d0745f6b0ff15 Reviewed-by: Michal Klocek <[email protected]>
* Ensure unique data path for the profileAnu Aliyas2024-12-061-0/+30
| | | | | | | | | | | Added data path verification to restrict profile creation. This change ensures that no two profiles can use the same data path. Any request to create a profile with the duplicate data path will now return nullptr. Change-Id: Ifb25861756775fb484b02a23c802bffb791c88bb Reviewed-by: Michael Brüning <[email protected]> Reviewed-by: Michal Klocek <[email protected]>
* Add WebEngineProfilePrototype for profile creation from qmlAnu Aliyas2024-12-066-0/+417
| | | | | | | This is a wrapper designed to handle profile construction from qml. Change-Id: I6f3c9e06052c08e81422e148c75c599cc361be95 Reviewed-by: Michal Klocek <[email protected]>
* Lazy initialization for offTheRecord settingAnu Aliyas2024-11-201-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | As per the current design when switching from profile from OTR to non-OTR requires valid storage name. If it is not there, then QtWebEngine display a warning message and and don't switch to disk based behavior for qml. This impose the restriction on qml initialization order, for non-OTR profile, the initialization should be of the order given below WebEngineProfile { offTheRecord: false storgaeName: 'Test' } Otherwise it won't switch to non-OTR profile. For example a setting like WebEngineProfile { StorageName: 'Test' offTheRecord: false } won’t create a non-OTR profile. Though from an end user perspective these two initialization are identical, the order of initialization is different and due to which these two settings yield different profiles. Added a single shot signal handler on the offTheRecord setter to handle such cases, and it will switch the profile to non-OTR mode only when the storage name is set. Amends 5f42c1b7877b0c74d939af0f04d09a23482bc74a Fixes: QTBUG-131397 Pick-to: 6.8 Change-Id: I1c1c21808cb49dfa3ba4340b000242a0f54e59e5 Reviewed-by: Michael Brüning <[email protected]> Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit 3477d952575a8ad8a8ca70c04a7cd3aa5d7d5f81) Reviewed-by: Qt Cherry-pick Bot <[email protected]>
* Doc: Fix QWebEngineDesktopMediaRequest documentationTopi Reinio2024-11-072-0/+78
| | | | | | | | | | | | | | - Add missing documentation for the QML type WebEngineDesktopMediaRequest. - Add missing documentation for the signals QWebEnginePage::desktopMediaRequested and WebEngineView::desktopMediaRequested. - Make some minor fixes to existing docs related to the type Pick-to: 6.8 Change-Id: I6fa824a9ac3c05a4e5aec259206bd00f64522e10 Reviewed-by: Allan Sandfeld Jensen <[email protected]> Reviewed-by: Safiyyah Moosa <[email protected]>
* Correct behavior of JavscriptCanAccessClipboardMoss Heim2024-11-041-6/+14
| | | | | | | | | | | | | | | | Previously, sanitized clipboard writes were only enabled with JavascriptCanPaste AND JavascriptCanAccessClipboard enabled. This broke backward compatibility with code that expected it to only be enabled by JavascriptCanAccessClipboard. This compatibility is now restored. In the permission manager, all writes and reads are still controlled by ClipboardReadWrite. Pick-to: 6.8 Fixes: QTBUG-130599 Change-Id: I03dc2ea739782e475faacc0900804708c37763cc Reviewed-by: Michal Klocek <[email protected]> Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Do not override signals in qml delegatesMichal Klocek2024-10-316-91/+19
| | | | | | | | | | | | | | Since 36478e25 in qtdeclarative overriding signals is reported as warning and will be dropped in the future as it is not supported. Drop 'accepted' and 'rejected' signals and use signals from base component, which is the "correct" way of handling it. Remove some logic coming from qqc1. Pick-to: 6.8 Change-Id: I3eeeca4b25fb866d0c6e3da01c1513afd85904f0 Reviewed-by: Michael Brüning <[email protected]>
* Add setting for JS touch events APIMartin Negyokru2024-10-292-0/+32
| | | | | | | | | | | | | | | | | | Currently we enable the touch events API by default if a touch screen is detected by the system. Some websites use this api to decide if they are on a mobile device or desktop and base their design on it. This can cause unwanted results on touch screen laptops or other setups that emulate a fake touch device. Add option to explicitly set the touch events API. Keep old behavior if the option is not used. [ChangeLog][Settings] Added JSTouchEventsEnabled setting Task-number: QTBUG-115764 Change-Id: Ica860f54557ee21f00c63a3d30f9074a0278bc8c Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Make download API asynchronousSzabolcs David2024-10-241-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | Modify the already existing downloadRequest() API. Now the requests not necessarily have to be answered in a directly connected signal handler and the API users can postpone their user's decision. The only exceptions are automatically accepted save page requests. There is no better place to call their callback than directly after the signal emission. Adapt auto tests to the new lifecycle of download items. Modify the quicknanobrowser example to use a simple async method to wait for the user's decision. Keep simplebrowser to use its old synchronous method to illustrate that it's still possible. Correct documentation at some places. [ChangeLog] QWebEngineProfile::downloadRequested() is not limited to synchronous usage anymore. QWebEngineDownloadRequest can be accepted or rejected later without blocking the browsing session. Fixes: QTBUG-118584 Change-Id: Ic1be6508126574dc77aa686f85bf35feafdb080d Reviewed-by: Peter Varga <[email protected]>
* Add PreferCSSMarginsForPrinting to QWebEngineSettingsSzabolcs David2024-10-212-0/+26
| | | | | | | | | | | | Add an option to choose between margins of the specified QPageLayout and the margins of the @media rules of CSS. [ChangeLog] New API added to QWebEngineSettings to optionally prefer CSS margin rules over QPageLayout for printing results. Task-number: QTBUG-58669 Change-Id: Idfec2deca0d326ea9339f67bce937e24ae5128f2 Reviewed-by: Michael Brüning <[email protected]>
* Add PrintHeaderAndFooter to WebEngineSettingsSzabolcs David2024-10-172-0/+28
| | | | | | | | | | Allow users to generate basic header and footer when printing. Pages will contain the URL, title, date and the page number. Add corresponding WebEngineSettings flags to the Core and Quick APIs. Task-number: QTBUG-70125 Change-Id: Icadd15c16267a204c900aa6895db73b2172e47bc Reviewed-by: Peter Varga <[email protected]>
* QQuickWebEngineView: silence deprecation warningVladimir Belyavsky2024-09-171-1/+1
| | | | | | | | Silence deprecation warning "'QJSValue::QJSValue': Use fromUtf8, QStringLiteral, or QLatin1StringView" when build with -DFEATURE_webengine_printing_and_pdf=OFF Change-Id: I2f165329caf6fc8bab4ec78c828c5d4a3cb923e7 Reviewed-by: Peter Varga <[email protected]>
* Fix not working popup with qquick on eglfsMichal Klocek2024-08-281-2/+3
| | | | | | | | | | | After refactoring in 5d1ef38 we lost popups with qquick. Unfortunately we do not have tests for it as we do not run eglfs on ci. Pick-to: 6.8 6.7 Fixes: QTBUG-119908 Change-Id: Iea6cadf96dcac488898bb31132938fe8020d4d79 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Permission manager: separate tracking of transient permissionsKaloyan Chehlarski2024-08-241-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the rewrite of the permissions API, transient (a.k.a non-persistent) permissions still passed through the persistent store sometimes, but were filtered out when using user-facing APIs. Unfortunately, thisstill presented some edge cases in the AskEveryTime permission policy mode. This change modifies the PermissionManagerQt class to store a second set of permissions, and associate them with a RenderFrameHost the way the Chromium API is designed to do anyway. This way, a permission will be kept around for the lifetime of a web page, and calling JavaScript APIs that trigger checks for permission state will work properly (e.g. navigator.mediaDevices.enumerateDevices). The new store is regularly cleaned up to make sure expired permissions are purged before they impact performance. As a side effect, this change also introduces pre-granting of non-persistent permissions, which was the biggest omission in the permissions rewrite. In those cases, the permissions will be temporarily stored inside the persistent store, and moved to the transient one the next time they're queried (and can thus be associated with a RenderFrameHost). This also fixes some extremely broken test cases that relied on invalid web API. Fixes: QTBUG-127951 Pick-to: 6.8 Change-Id: Ic084af7673ea0b255d98d94382e77323bb5e7ab0 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Make QQuickWebEngineDownloadRequest publicAllan Sandfeld Jensen2024-08-234-21/+11
| | | | | | | | | | We only really need the QWebEngineDownloadRequest, but the fact it was just that was in the private header. Pick-to: 6.8 Fixes: QTBUG-120370 Change-Id: I9bcd79e068e67ec0ed07ae31cfb2a0d4e011e22b Reviewed-by: Anu Aliyas <[email protected]>
* Doc: Replace \instantiates with \nativetypePaul Wicking2024-08-2019-27/+27
| | | | | | | | | | | Since the implementation of the `\nativetype`-command in QDoc, the `\instantiates`-command is deprecated. Replace the use of the deprecated command in favor of its replacement. Pick-to: 6.8 Task-number: QTBUG-128216 Change-Id: I10cad9942e34301ded99c7014c1c70375e0698e1 Reviewed-by: Venugopal Shivashankar <[email protected]>
* fix: Avoid empty engineTian Shilin2024-08-201-2/+4
| | | | | | | | | | | | | | | | | | The engine variable is obtained by calling qmlEngine(m_view). If m_view is not associated with a valid QML engine, then the engine may be null,so advancing the null check on the engine to immediately after the engine is fetched ensures that an invalid engine is not accidentally used in subsequent code, especially if(m_importDirs.isEmpty() && !initializeImportDirs(m_importDirs, engine)),which I verified with a static scan tool to verify the above statement,and found that it does indeed result in a nullpointer error of type Pick-to: 6.8 6.7 Change-Id: I8cc427d2b94f93e8c9fc24a202d41abd8e00143d Reviewed-by: Michal Klocek <[email protected]>
* QQuickWebEngineProfile: Add missing REVISION to new propertyKaloyan Chehlarski2024-08-191-1/+1
| | | | | | | | Found during API review. Pick-to: 6.8 Change-Id: I2e84f4d9fd5f95f8f4726ed130d67fc715d57d18 Reviewed-by: Michael Brüning <[email protected]>
* Prevent OTR to non-OTR profile switching when the storage name is emptyAnu Aliyas2024-08-131-0/+7
| | | | | | | | | | | When switching from profile from OTR to non-OTR requires valid storage name. If it not there, then display a warning message and and don't switch to disk based behavior. Fixes: QTBUG-126312 Pick-to: 6.7 6.8 6.2 Change-Id: Id689c8b280b4070b9ecbf11c6001685ac4ffd2f3 Reviewed-by: Allan Sandfeld Jensen <[email protected]>
* Doc: Document value types with \qmlvaluetypeTopi Reinio2024-08-083-3/+11
| | | | | | | | | | | As these types are value types, document them as such. Separate object and value types on the QML module page, and fix the incorrect \instantiates argument for webEngineFrame. Pick-to: 6.8 Change-Id: Ieb654efef0ede0eea7c10537d51cc040dc4e9935 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Moss Heim <[email protected]>
* Printing: Unify PDF generation among print() and printToPdf()Szabolcs David2024-08-081-1/+1
| | | | | | | | | | | | | | | | For the rasterized print() job, we have been generating the PDF data without margins and then QPrinter applied its margins when drawing to the device. Margins were the only differences between PDF generations for print() and printToPdf(). By taking the margins into account at generation time, and setting QPrinter margins to null and then restoring it after the job, we can get rid of this terrible design choice and having a unified PDF generator backend. This results a much more simpler code and opens the way for other developments. Change-Id: If2dd8932073f5112e2e29d52db624db496f59684 Reviewed-by: Michael Brüning <[email protected]>
* Update WebEngineWebAuthPinRequest documentationAnu Aliyas2024-08-051-1/+1
| | | | | | | | | | WebEngineWebAuthPinRequest is a QML value type and it's name should begin with lowercase letter. Modified documentation and type name accordingly. Pick-to: 6.8 Change-Id: Id238479799cb3538f2ea329cfa18d2d2f4c44c8f Reviewed-by: Allan Sandfeld Jensen <[email protected]>