summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
Commit message (Collapse)AuthorAgeFilesLines
* Add hasPostData to QWebEngineNavigationRequestAllan Sandfeld Jensen8 days1-0/+1
| | | | | | | | | | [ChangeLog][QtWebEngineCore][QWebEngineNavigationRequest] hasFormData has been added to indicate navigations request (re)posting form data. Fixes: QTBUG-67613 Change-Id: I0275513a12d4591a53040c62bfce636e99926ab7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Add local fonts permission support to QuickWebEngineViewKaloyan Chehlarski2024-03-221-0/+1
| | | | | | | | | This change hooks up QuickWebEngineView to the newly-enabled local font access API. Task-number: QTBUG-121320 Change-Id: Ib7e093904ea8d834a2282cd265086e501cb392ff Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add granular permission for clipboard-read/writeMoss Heim2024-03-112-6/+7
| | | | | | | | | | | | | | | 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-0/+5
| | | | | | | | - 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>
* Remove extra semi-colonsTasuku Suzuki2024-02-061-1/+1
| | | | | Change-Id: I0cc532c63f900b3bd56268a4d8a7132d3caea4f7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add scroll animator to QML APIAllan Sandfeld Jensen2024-02-011-0/+2
| | | | | | | | | | Was missing from the QML settings. Change-Id: I585fd7906b6831d9cf1c560427be18b1d76fd8ca Fixes: QTBUG-85473 Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Correct PrintedPageSizeId to match QPageSize::PageSizeIdMichael Brüning2024-01-241-4/+2
| | | | | | | | | | With Qt 6, QPageSize::PageSizeId enum was cleaned up and some values were reordered, but the WebEngineQuick part was not changed accordingly. Pick-to: 6.7 6.6 6.5 Fixes: QTBUG-120218 Change-Id: I7e4c419750d30a64193e68b0b217ebbccce07d87 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Update QWebEngineDesktopMediaRequest based on API reviewMartin Negyokru2024-01-221-3/+3
| | | | | | | | | | | | | - Port the request's d-pointer to std::unique_ptr - Disable copy of the request - Remove QWebEngineMediaSourceModel from the header - Remove the NameRole definition - Update tests and documentation according to changes - Use forward declaration in qwebenginepage Pick-to: 6.7 Change-Id: I972b3104a0bca5367a4bb63ac183a60d00a71776 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Update QWebEngineWebAuthUxRequest based on 6.7 API review commentAnu Aliyas2024-01-171-47/+47
| | | | | | | | | | | - 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>
* Fix cursor position during compositionAnu Aliyas2024-01-091-2/+2
| | | | | | | | | | | | | During input composition, the cursor is set to the starting position of the string being edited and refrain from updating it throughout the composition process. Once the string is committed, it is set to the last position of the committed string. The modified code is designed to exhibit the same behavior as the widget and quickwidget. Fixes: QTBUG-118746 Pick-to: 6.5 6.6 6.7 Change-Id: I9adb7a9bea9493457a1d9d4b32338cdba30920a1 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Add new API for screen capturingMartin Negyokru2023-12-151-0/+9
| | | | | | | | | | | | [ChangeLog][WebEngineCore] Add QWebEnginePage::desktopMediaRequested() signal [ChangeLog][WebEngineQuick] Add QQuickWebEngineView::desktopMediaRequested() signal Pick-to: 6.7 Fixes: QTBUG-112142 Task-number: QTBUG-70077 Change-Id: I4bfad88732b45fb68b77f7617440bcb50b248a11 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Chromium 118 adaptationsAllan Sandfeld Jensen2023-12-091-2/+1
| | | | | Change-Id: I8eea99a472cc597ff9864b570c90b28b79b3751e Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* tst_QQuickWebEngineViewGraphics crash in Debug modeAnu Aliyas2023-11-241-0/+1
| | | | | | | | | | - DCHECK hit while running tst_QQuickWebEngineViewGraphics test. - Added qWaitForWindowExposed() to wait for the windows, and then perform the verification. Pick-to: 6.6 Change-Id: Ia5c2dba5f1c38ae06e7aac24f0f6d5f3d6f5859d Reviewed-by: Michael Brüning <michael.bruning@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Allow cancelling automatically accepted download requestsSzabolcs David2023-10-171-3/+22
| | | | | | | | | | | | | Calling QWebEngineDownloadRequest::cancel() had no effect if the download request was accepted by default. These downloads had no corresponding internal DownloadItem yet, but we tried to cancel them using the DownloadManager. The safest option is to always check if the DownloadItem exists in Chromium. Pick-to: 6.6 Task-number: QTBUG-117624 Change-Id: I8f92d45e00e088aea7d22d5b7271b5b09adf6cbb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Provide the correct type information for WebEngineViewAnu Aliyas2023-10-131-6/+6
| | | | | | | | | | | | -Duplicate entries in the QML type file are created when exporting the type as a value and its enums within a namespace. Resolved this by introducing a derived class, and using it for exporting the Enums. - Added namespace resolution to avoid type ambiguity Fixes: QTBUG-117031 Pick-to: 6.6 Change-Id: Ieea4492238843c3c781c8d9602ddc89207b61137 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Support auto accepting non-HTML saves when a path was specifiedSzabolcs David2023-10-011-0/+20
| | | | | | | | | | | | | | | Images and PDFs had to be explicitly accepted to download, even if a filePath was given as argument of QWebEnginePage::save(). This behavior was inconsistent with saving HTML pages (and the documentation). Adjust the corresponding test case with verifying the download result of an auto-accepted download, and add a new test case to make sure about downloads are not accepted by default when there is no desired filePath. Pick-to: 6.6 Task-number: QTBUG-117624 Change-Id: I90f4cfa485da2831327bcb25571a0b69499d9006 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Support filePath argument of save() when saving non-HTML filesSzabolcs David2023-10-011-0/+2
| | | | | | | | | | | | | | Currently the filePath argument of QWebEnginePage::save() is ignored when the user tries to download anything but HTML; and the requested download path is the Downloads folder of the OS. Fix this and adjust the corresponding test case with checking path and file name of the download request. Pick-to: 6.6 Task-number: QTBUG-117624 Change-Id: Ia1d3afc898b1aad223aab772b775724a50e88bd3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QWebEngineSettings::ForceDarkModeMartin Negyokru2023-09-282-0/+28
| | | | | | | | | Enable forcibly modifying content rendering to result in dark color scheme. [ChangeLog][Settings] ForceDarkMode added, disabled by default. Fixes: QTBUG-84484 Change-Id: I4b3512dc365c61da8f91d8dead0715dadce91f75 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Improve QWebEngineDownloadRequest::isSavePageDownload()Szabolcs David2023-09-281-0/+21
| | | | | | | | | | | | | | | | | | | WebContentsImpl::IsSavable() decides which file formats are saveable, but it allows this only for text-based files. All other files will go around on the code path of downloading. MHTML (multipart) and PDF files are saved like this, which means they aren't marked as isSavePageDownload. Just simply set this flag if the save was requested by the user even if it was a download. This fixes the flag for saving MHTML and PDF files from context menu, and leaves the flag false when a PDF download was initiated by the button of the web UI. Pick-to: 6.6 Task-number: QTBUG-114859 Change-Id: Id65f26a96952c5a43876338ad37f40570e544f3a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Try stablizing testsAllan Sandfeld Jensen2023-09-241-8/+4
| | | | | | | | | | qmltests::WebEngineViewSingleFileUpload::test_acceptSingleFileSelection and tst_QWebEngineView::textSelectionOutOfInputField Pick-to: 6.6 Change-Id: Ica3e91f109ae2a43bff9cd25e0da7d363823a762 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Improve tst_QQuickWebEngineView::savePage auto testPeter Varga2023-09-141-3/+9
| | | | | | | | | | | | | | | | Use ScopedConnection to avoid "stack-use-after-return" address sanitizer error. Also reduce potential wait time in case of failure by waiting for accepted and finished states individually (same as tst_QWebEngineDownloadRequest tests). Pick-to: 6.6 Fixes: QTBUG-116738 Task-number: QTBUG-56093 Change-Id: I49a60c95a816ae1b4cb6b227501ff81ca9c6f82b Reviewed-by: Anu Aliyas <anu.aliyas@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Switch response headers to QMultiMapAllan Sandfeld Jensen2023-08-291-2/+2
| | | | | | | | | To allow duplicate key values and preserve order within multi key duplicates Pick-to: 6.6 Change-Id: I8da0a3441255c9b72256d63f4ede10491c96c2dc Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Mark the module as free of Q_FOREACH, except where it isn'tMarc Mutz2023-08-181-0/+2
| | | | | | | | | | | | | | | | | | | The density of Q_FOREACH uses is non-negligible here, too high for this author, still unfamiliar with this module, to tackle in a short amount of time. But they're concentrated in just a few TUs, so pick a different strategy: Mark the whole module with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). Created QTBUG-115805 to keep track of this. Task-number: QTBUG-115805 Change-Id: I7a80b1820972687ccced24d9edd7a8f5b826556f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add clearHttpCacheCompleted signal to profilePeter Varga2023-08-171-0/+1
| | | | | | | | | | | | | [ChangeLog][QtWebEngineQuick][WebEngineProfile] Added clearHttpCacheCompleted signal. [ChangeLog][QtWebEngineCore][QWebEngineProfile] Added clearHttpCacheCompleted signal. Fixes: QTBUG-89670 Fixes: QTBUG-111541 Change-Id: If93a99f7171c516ef75a3c8004da9ae621705a1a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Rename disableReadingFromCanvas to follow naming styleAllan Sandfeld Jensen2023-08-102-4/+4
| | | | | | | | | | | We prefer to name settings with Enabled at the end. From API review. Pick-to: 6.6 Change-Id: I7aacc6dbb92d852fd21b067475d2fd9e7df56163 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
* Fix blacklisted qemu-arm64 testsMartin Negyokru2023-07-283-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - test_findTextInterruptedByLoad: Remove whitespaces from the text as it takes lot of time to render according to perf. It should fix the timeout errors. - loadStartedAfterInPageNavigation: Remove the viewport meta tag from test.html. The 2x scale is only applied in embedded builds, it puts some elements out of the view. - acceptNavigationRequestNavigationType: Refresh the reload.html page only once. On qemu it may reload multiple times messing up the list of navigation types. - horizontalScrollbarTest: Skip instead of blacklist. - tst_qtbug_110287: Use an url that loads faster. Pick-to: 6.6 Task-number: QTBUG-105342 Change-Id: Ifbd41885fee62b12f7022534f9b8bd5e20cbef01 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix geolocation permissions to use new Qt Permissions APIMichael Brüning2023-07-261-2/+5
| | | | | | | | | | | | | | | 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-121-0/+47
| | | | | | | | | | | - 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>
* Adaptations for Chromium 112Allan Sandfeld Jensen2023-07-061-0/+1
| | | | | | Pick-to: 6.6 Change-Id: I1bb84b20a080d7f615bf0795ac2d97739e99ac1d Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Sync WebAction enums of QQuickWebEngineView/QWebEnginePageFriedemann Kleint2023-06-281-0/+1
| | | | | | | Pick-to: 6.6 Change-Id: Ibe750d541dba458f2278632355bcaf864fdc845a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* RenderWidgetHostViewQtDelegateItem: keep grabsShawn Rutledge2023-06-222-0/+68
| | | | | | | | | | | | | | | | | | | If a WebView or WebEngineView gets a mouse or touch grab, we don't want to give it up to any handlers that may be lurking on Items underneath. WebView is opaque, so we don't know whether the user is trying to drag a scrollbar or something else, but interactive items outside shouldn't interfere, in general. [ChangeLog][QtWebEngineQuick] WebEngineView (or WebView backed by Qt WebEngine) no longer allows components outside to take over the mouse or touch exclusive grab. For example if the user starts dragging a scrollbar inside the web view, that continues until release, regardless of any DragHandler, Flickable etc. Fixes: QTBUG-103518 Pick-to: 6.5 6.6 Change-Id: I4352dc8482020f0efc7a0901e94ccf7fc147fa1b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix string -> stringlist conversion in filePicker testMichal Klocek2023-06-071-2/+2
| | | | | | | | | | Since 67d0c0821 in declarative strings are not longer converted to QStringList in case of c++ calls. Be explicit now. Fixes: QTBUG-114339 Pick-to: 6.6 6.5 Change-Id: I644a50eea6640d751d81a5a21f478577d4c999cb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QWebEnginePage::devToolsId()Benjamin Terrier2023-05-312-0/+18
| | | | | | | | [ChangeLog][WebEngineCore] Add QWebEnginePage::devToolsId() [ChangeLog][WebEngineView] Add devToolsId property Change-Id: I16e8a27d595b010239557c2a3af2d3b39976cd46 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add QWebEngineSettings::DisableReadingFromCanvasAnu Aliyas2023-04-242-0/+38
| | | | | | | | - disables reading from canvas. Fixes: QTBUG-84486 Change-Id: I3e181bfa6e351dea8dfa61f8010bafb94ea8a77d Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Add WebEngineView::save() convenience APIAnu Aliyas2023-04-204-1/+207
| | | | | | | | | | Add the convenience method QQuickWebEngineView::save for saving pages without the need to explicitly handle download requests. Task-number: QTBUG-56093 Change-Id: I67909fdca6472d1ea9b32e0f89c1ab90219bca3b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add qml filesystem api testsMichal Klocek2023-02-274-0/+200
| | | | | | | | | | | | | | | | | | | There are three functions we use within file systems API, which trigger dialogs: * window.showSaveFilePicker * window.showOpenFilePicker * window.showDirectoryPicker Only first one was tested with widgets, therefore add tests which cover use of api, and also test cover the found issues in previous commits. Note we have separate test to cover file system dialogs coming from <input> html tags in tst_filePicker Pick-to: 6.5 6.4 Change-Id: I4616efa84688ed471fb8c4566e49262bce945638 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Support LTR and RTL text directions in input fieldsSzabolcs David2023-02-154-1/+49
| | | | | | | | | | Implement WebActions to temporarily change text direction directly from context menu - like Chrome does. They only work for the selected input field. Omit the "default" option since it is always grayed out in Chrome. Task-number: QTWB-67 Change-Id: I4bacbd82c6bd7261ac465eec9da3776613f98074 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QWebEngineLoadingInfo: Add response headersYigit Akcay2023-02-131-1/+3
| | | | | | | | | | | | | | | | | | | | This change adds a member variable that contains the response headers to QWebEngineLoadingInfo. It is filled when a QWebEngineLoadingInfo instance is constructed inside WebContentsDelegateQt::emitLoadFinished(bool). The response headers are extracted from the navigation handle when WebContentsDelegateQt::DidFinishNavigation(content::NavigationHandle *) is called. The response headers are non-empty when QWebEngineLoadingInfo::status() is equal to QWebEngineLoadingInfo::LoadSucceededStatus or QWebEngineLoadingInfo::LoadFailedStatus. Fixes: QTBUG-106862 Change-Id: I4d196e3cc71725ddad9a5832af72d1b4e50924c8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Skip favicon database QML tests on High DPI screensPeter Varga2023-01-161-0/+6
| | | | | | | | | | | | | The tests use the middle pixel's value of an image to check if a certain icon is loaded. The images are scaled on High DPI screens and the pixel values are changed due to interpolation. It cannot be expected to have the same pixel values for different device-pixel-ratio settings, thus rather skip the test than maintaining a list of pixel values for different scales. Pick-to: 6.5 Change-Id: I8d142de0106167a5d16c540fa468003b36c95317 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Quick: Fix file selection modes in the default UI delegateSzabolcs David2023-01-153-1/+20
| | | | | | | | | | Our implementation of QML file picker was outdated. Now directory picker is a separate type of dialog and other file selection modes are set in FileDialog.fileMode property. Pick-to: 6.4 6.5 Change-Id: Icc62369539c56666e596e5ee6f1b3068a43acd81 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix contentsSize and scrollPosition on High DPI screensPeter Varga2023-01-131-4/+3
| | | | | | | | Provide the same values what are available from JavaScript. Pick-to: 6.5 Change-Id: I9e047d749279934d0c8ccd45710571e8c7745859 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix build with -no-accessibilityPeter Varga2023-01-091-1/+9
| | | | | | Pick-to: 6.5 Change-Id: I7128608467e4d0ce1b04efa9b82a98f78942d4db Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Remove setPushServiceEndpoint from APIMichal Klocek2022-12-221-2/+2
| | | | | | | | | | Use setPushServiceEnabled instead. Update also getter and documentation. Task-number: QTBUG-107442 Pick-to: 6.5 Change-Id: I299ce88b06edef0f1a0088fb10f4a142056039be Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Adaptations for 106-basedAllan Sandfeld Jensen2022-11-282-2/+2
| | | | | | Change-Id: I2fe91c06ce91dfaace7825a0589b56ee375479b6 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add client SSL authentication testMichal Klocek2022-11-221-2/+3
| | | | | | | | | | | | | | | | Our qwebenginecertificatestore unit test so far only tested adding/removing custom certificates into the memory. However, it never actually initialized certificate store and did not test if ssl certificate client authentication really works. Cover that case and client authentication test. Note ca and client certificates in the test are self signed to be able to run test without network connection, however we ignore the errors. Pick-to: 6.4 Change-Id: I4df4fdfabed5abd8f8bde7d4c0c79b5fd7f6f3a9 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Port from container::count() and length() to size() - V4Marc Mutz2022-10-113-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); a.k.a qt-port-to-std-compatible-api V4 with config Scope: 'Container'. Change-Id: I3e6fef8eca212da0c4f0b464545ba96183b4476f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-2/+2
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I4b5f85df579532c2af938fe70db945ba273782fb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Enable Push MessagingSzabolcs David2022-09-121-0/+2
| | | | | | | | | | | | | | | | | | Use Chrome's implementation of PushMessagingService. This feature relies on notification permissions, so it is not different from Web Notification from end-users perspective. We don't persist push subscriptions, because it seems these have to be consistent with persisting notification permissions. Make address of push service configurable by a profile setting. It is empty by default - which means the feature is disabled until the user sets the address of a push service. Task-number: QTBUG-98904 Task-number: QTBUG-53457 Change-Id: If44f459fecf2da482c28fee5562f62fe40de103e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Improve tests for qemu-armv7Allan Sandfeld Jensen2022-09-022-3/+2
| | | | | | | | | | | test_runJavaScript() was badly written with a hardcoded wait of 100ms this should make it both faster on normal machines and more reliable on slower ones. Fixes: QTBUG-106210 Pick-to: 6.4 Change-Id: I539e59dce6e3719661202e1a213277794a660bd3 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2610-10/+10
| | | | | | Task-number: QTBUG-105718 Change-Id: I2ad190e5536cdbdc8d2656e61892545d66911a02 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>