summaryrefslogtreecommitdiffstats
path: root/src/webenginequick
Commit message (Collapse)AuthorAgeFilesLines
* Fix Quick popup window positioning under X11Peter Varga2025-12-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | If the popup window has the Qt::Dialog flag, some window managers may try to resize and move the popup after it becomes visible. This can lead to a blinking popup or even worse, it can cause a loop that continuously moves the popup window. Replace Qt::Tool flag with Qt::Popup to get rid of the Qt::Dialog flag but keep popup as popup. Note on Wayland Qt:Tool is xdg toplevel not a 'popup' neither 'grabbing popup' and it creates shell surface. This means it will get random position on the screen. Note this tricky issue as we already changed that several times both for widgets and quick due to different reasons (see 1390979a, 2f720836, 58467ed19, 7e7dd2625, c56169f7a1) Fixes: QTBUG-140321 Task-number: QTBUG-132794 Task-number: QTBUG-138747 Pick-to: 6.10 Change-Id: I8c3a94519008455fac2d8ab4c3bf34d860e2475b Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Make html comoboxes great again (2/2)Michal Klocek2025-12-012-31/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is band-aid patch to handle QQuickWebEngineView transformations like scaling and rotation. Before this patch we used mapToGlobal to get viewGeometry however if the item is transformed by rotation and scaling the mapToGlobal will return something not expected by Chromium. Imagine: --------- ------- | aaaaa | | aaaa| | bbbbb | => rotates 90 => | bbbb| | ccccc | | cccc| --------- | | ------- So Chromium still 'thinks' that content is displayed horizontally and just window geometry changed. Moreover, mapToGlobal for rect QRectF(tl,rb) when this is rotated by 90 degree will return QRectF(tr,bl).nomralized() in global coordinates. This is not correct geometry. As band-aid solution for transform case, go with fixed view geometry of QRect(0,0,widith(),hight()) This will allow to Chromium get untransformed popup position, which we later transform in delegate. Fix and simplify transformation calculations in QQuickWindow delegate using just global screen coordinates. Note having fixed view geometry will have side effect like accessibility mappings broken or screen edge detection not working (if dropdown comobox can not be displayed due to screen border it is simply moved over the combobox filed) Therefore, this is just band-aid solution, which covers anyway rare use case of doing the QQuickWebview transformation within the scene. Tested with openbox, weston, mutter-wayland, mutter-xwayland. Pick-to: 6.10 Change-Id: I3c2d662ccd093793da6b5e192d79c9e22e451789 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Make html comoboxes great again (1/2)Michal Klocek2025-12-011-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During transition from Qt5 to Qt6, we moved some code to core and in 5d1ef38f9 we moved RWHV delegate to core. Before that change we used to feed chromium with geometry and frame geometry of delegated window and later in case of qquickwindow based delegate we did dome extra 'fixup' calculations to cover the fact that using geometry() for view geometry in screen coordinates did not include actual item delegate offset from the qml scene. However after the change we use simply mapToGlobal within the delegate for view geometry which already knows exact global coordinates for the item within the qml scene. In e2185036 we have fix for accessibility layout, however local coordinate mappings makes no sense as it will always return "0". this->mapFromItem(this,QPoint(0,0)) Use simply global coordinates here, and remove obsolete "fixup" calculation for offset in qquickwindow delegate. Note this patch does not care about rotated qquickwebengineview. The band-aid patch for that is in followup. Task-number: QTBUG-135040 Fixes: QTBUG-140321 Fixes: QTBUG-139709 Pick-to: 6.10 Change-Id: I01266b42bc74120e39e2703db78c2b9c3548572f Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Notify about global mapping changes of QQuickWebEngineViewMichal Klocek2025-12-011-5/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Chromium needs to be aware of view geometry changes. We do the sync in visualPropertiesChanged call, which in turn is called from item geometryChanged and itemChanged handlers. However, this approach is not sufficient to track global geometry changes as it only covers case where geometry change is local to item's parent. Therefore, we need watch the entire parent hierarchy to correctly handle global geometry change notifications. Note this issue only affects webenginequick as rwhv can have offset from the scene due to explicit position or anchoring within other items. Moreover, anchoring of child item can mean making offset in parent item. Add logic to track offset changes of parent items. Use 'polish' accumulate required notification and do visualPropertiesChanged() in updatePolish() call. Fixes: QTBUG-141476 Pick-to: 6.10 Change-Id: Ia35a6f243624cb06b6b45f76abf8ba544790e2c0 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* QQuickWebEngineView: handle null qmlEngine in navigationRequested()Vladimir Belyavsky2025-11-271-1/+7
| | | | | | | | | | | | | | | | Bail out earlier and do not crash in navigationRequested callback when qmlEngine is null. This may happen when using WebEngineView e.g. in a Loader, as the QML context data is cleared before the object is destroyed and accordingly, before we unsubscribe from the callback. Note this is band aid fix, as it is still unclear why this problem did not occur here before (e.g. with Qt 6.8.3). Task-number: QTBUG-137768 Pick-to: 6.10 Change-Id: I33bbaf4240511d20f0b839317fb496fd5b270006 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Quick: Add runJavaScript overload with std::function callbackKaloyan Chehlarski2025-11-262-0/+9
| | | | | | | | | | | | | This is to be used in QWebView, where the WebEngine backend is based on our Quick API. With the addition of a C++ WebView API, we need a way to call C++ callbacks, and the JavaScript-based callback mechanism that's currently there is insufficient. We can't expose an std::function parameter to QML, so this overload is there for internal use only. Change-Id: I22b17c2d2ba554078d0e1e39110147399e93102b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Doc: Add missing property docsPaul Wicking2025-11-062-6/+22
| | | | | | Task-number: QTBUG-140629 Change-Id: Iab2d22dba0ff8728786f3554bb537808735782cd Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Docs: Fix linking of WebEngineDownloadRequest::SavePageFormatMichal Klocek2025-10-301-2/+2
| | | | | | | | | Fix warning from qdoc, fix capitalization issues so links do work now. Pick-to: 6.10 Change-Id: Iafcf63e47bdcc4192059f19fcbf6fbee892482d8 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix QWebEngineDesktopMediaRequest registrationMichal Klocek2025-10-301-8/+8
| | | | | | | | | | | | | | Qml type registration complains about "...nor a default- and copy-constructible Q_GADGET..." Therefore change to be value type, add default constructor. This amends 6f4315175d4c7846c0591954ed03b14d405c9a90. Pick-to: 6.10 Fixes: QTBUG-141112 Change-Id: Ib230e3766bac2451d58da903ad1c1d44e5519862 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Minor. Clean up qquickwebengineforeigntypesMichal Klocek2025-10-301-121/+110
| | | | | | | | | | | | | | | | | | | | | Go through all foreign registered types and cleanup the code. Divide file into two sections: * qml object types * qml value type Use proper QML_VALUE_TYPE macro for registration, Add CREATE_DERIVED_FREIGN_NAMESPACE macro. Remove QML_UNCREATABLE as all value types should be default constructable. Note Fixes for QWebEngineDesktopMediaRequest are done in separete commit. Pick-to: 6.10 Change-Id: I0dfbcffc28d58c7cf46b7b7805e4ff0623f17f42 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add chlid frame to qml api of webengineframeMichal Klocek2025-10-283-0/+21
| | | | | | | | | It seems that children property was overlooked. Add it so it is posible to crawl the frame tree. Pick-to: 6.10 Change-Id: Ie4e13ccbc695a4db3782ce2c993c74ebb3d1cc9a Reviewed-by: Moss Heim <moss.heim@qt.io>
* Introduce QQuickWebEngineFrameMichal Klocek2025-10-286-18/+143
| | | | | | | | | | | | | | | | | | | | QWebEngineFrame class includes QJsValue in its api, however to make it work it would require instance of Qml engine. In also means that using qwebenigneframe requires Qml module. Move the methods/logic to new class qquickwebengineframe, however keep the already added SMF and default constructor. Deprecate broken usage of functions taking QJsValue. This amends 3ee3548e4c663402848db3b1336bf56e7c6d327e. Task-number: QTBUG-139710 Pick-to: 6.10 Change-Id: Ia45a52e9d8759f6a4641f8a121e8e05cd60c2eaf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Moss Heim <moss.heim@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* CRA mark src/webenginequickKaloyan Chehlarski2025-10-0646-3/+48
| | | | | | | | QUIP: 23 Fixes: QTBUG-138715 Pick-to: 6.10 6.9 6.8 Change-Id: Id3edb3400c98f2489cfada7edc8559110f57a3ca Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Docs: Fix webEngineDesktopMediaRequest docsMichal Klocek2025-09-232-11/+12
| | | | | | | | | The underling type is now a qml value, update docs accordingly. Pick-to: 6.10 6.10.0 Change-Id: Ic25b5055802d1b1fe8dcc4a920e9a74d5d0f484f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Fix -no-ssl buildPeter Varga2025-09-171-2/+6
| | | | | | | | Amends 671afae06 Add API for providing additional CA certificates Pick-to: 6.10 Change-Id: I7e40b9b24e319e89c94d13516ebbc896c8ba6f69 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Fix type issues in WebEngineView QML docsKaloyan Chehlarski2025-09-101-9/+9
| | | | | | | | | | - QString -> string - QWebEngine... -> WebEngine... - Remove nonsense asterisks from method/signal parameter lists Pick-to: 6.10 Change-Id: I9ad262def8ab2a9513fb1b350e388e158a880269 Reviewed-by: Moss Heim <moss.heim@qt.io>
* Docs: Fix documentation for qml type valuesMichal Klocek2025-09-107-37/+45
| | | | | | | | | Go though our value types docs and fix the capitalization. Add missing qdoc tags. Change-Id: I856a870a333647e656f0b53cad684f806392c6ec Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Doc: Slightly reword recentlyAudibleChanged descriptionKaloyan Chehlarski2025-09-081-3/+2
| | | | | | Pick-to: 6.10 Change-Id: Iea3603e13439c0e9e205fc4d99698a49bb8c6c44 Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
* Doc: Minor comma fixesKaloyan Chehlarski2025-09-081-2/+2
| | | | | | Pick-to: 6.10 Change-Id: I1ed24289af08aad651c93a09cb342dc9e8b71349 Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
* Doc: Expand size() and contentSize() definitionsKaloyan Chehlarski2025-09-082-2/+7
| | | | | | | | | These now mention what units the return sizes are in, and what effects high-DPI displays have. Pick-to: 6.10 Change-Id: Icdf0a2c36116d360d5cc158793694422cb33b0cc Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
* Doc: Add [since X.X] tags to enums that are missing themKaloyan Chehlarski2025-09-081-72/+66
| | | | | | Pick-to: 6.10 Change-Id: Ie121e22e18ef61d4c9ecb6fa9085889e742fb7be Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
* Fix QML usage of QWebEngineFrameAllan Sandfeld Jensen2025-09-061-12/+21
| | | | | | | | | | It was considered incorrectly registered, and caused crashes when used. Pick-to: 6.10 6.9 6.8 Fixes: QTBUG-139710 Change-Id: I5d99c4e46274ead8330893e4d9e0aa7cc99aefc1 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Docs: Fix navigation between qml user script collection and web scriptMichal Klocek2025-09-012-15/+15
| | | | | | | | | | | | Use lower case for webEngineScript. Use correct 'qmlvaluetype' section. This amends 1eb2cb02f7ebdfc15a0d2ddc7837d4cffe073006. Fixes: QTBUG-139624 Pick-to: 6.10 6.9 Change-Id: I4766ac876401ac2937af33383dfad48a5f6d1498 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Docs: Fix user script collections docMichal Klocek2025-09-011-2/+2
| | | | | | | | We replaced js array with a qml list for user script collection. Pick-to: 6.10 6.9 Change-Id: Ibef8443c89127cde784aa8e25d62259ad86c51c1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove unnecessary QQmlEngine usageAllan Sandfeld Jensen2025-08-2610-173/+19
| | | | | | | | | | Reverts most of f5fbc34fc16fc9c6e7f7e8bbbf60f5b343b9466d, relying on better implicit QML conversion since. Fixes: QTBUG-138881 Pick-to: 6.10 6.9 6.8 Change-Id: Ic23579e421f737b9a4d85c7e4f1a4019323c4be9 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Doc: Expand some definitions in WebEngineHistory documentationKaloyan Chehlarski2025-08-251-3/+12
| | | | | | Pick-to: 6.10 Change-Id: I7cd6ab15d470321f8d830930d8e21e33a5a53be4 Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
* Doc: Synchronize some QML and Widgets documentationKaloyan Chehlarski2025-08-251-0/+13
| | | | | | | | | Copied over information that was only present on one side, but missing on the other. Pick-to: 6.10 Change-Id: I673cfdd7d3e86c1432d035e8902cb9e859e7fcda Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
* Doc: Mention Cmd/Ctrl instead of just CtrlKaloyan Chehlarski2025-08-251-1/+1
| | | | | | Pick-to: 6.10 Change-Id: I3275c5dc5c96aa32210972844f1ee65591ab028b Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
* Mark extensionManager as a constantAllan Sandfeld Jensen2025-08-201-1/+1
| | | | | | Pick-to: 6.10 Change-Id: I93acb15935ac43baf72006e2e563c5485f7e173d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Associate permissions with framesKaloyan Chehlarski2025-08-203-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 <allan.jensen@qt.io>
* Export qml extension types in webenginequickAllan Sandfeld Jensen2025-08-171-0/+24
| | | | | | | | From API review. Pick-to: 6.10 Change-Id: Ibcdf7780d1c03f601a703b35118d0b439e4df62c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix case of QML webEngineScript documentationAllan Sandfeld Jensen2025-08-161-9/+9
| | | | | | Pick-to: 6.10 6.9 6.8 Change-Id: Ia7e65f9050a1e57a3a2c7da69088e68fc7874ef1 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* WebEngineQuick: Expose QWebEngineClientHints to QMLOlivier De Cannière2025-08-151-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 <ulf.hermann@qt.io>
* WebEngineQuick: Expose QWebEngineDesktopMediaRequest to QMLOlivier De Cannière2025-08-141-0/+9
| | | | | | | Task-number: QTBUG-138589 Pick-to: 6.10 Change-Id: If8eb6447c3380efa03258f478da68feddccd1988 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add PersistentCookiesPolicy::OnlyPersistentCookiesMoss Heim2025-08-113-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 <michal.klocek@qt.io>
* Stop using private V4 APIAllan Sandfeld Jensen2025-08-071-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 <michal.klocek@qt.io>
* 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 <michael.bruning@qt.io>
* 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 <allan.jensen@qt.io>
* 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 <fabian.kosmale@qt.io>
* Adaptations for Chromium 132Allan Sandfeld Jensen2025-07-141-1/+2
| | | | | | Pick-to: 6.10 Change-Id: Id2d09604201b2c007c76328f92bb4e0c0d802cae Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* 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 <michael.bruning@qt.io>
* 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 <ulf.hermann@qt.io>
* 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 <allan.jensen@qt.io>
* 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 <allan.jensen@qt.io>
* 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 <moss.heim@qt.io>
* 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 <michal.klocek@qt.io>
* 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 <allan.jensen@qt.io>
* 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 <allan.jensen@qt.io>
* 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 <ivan.solovev@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* 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 <michal.klocek@qt.io>