summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkreplywasmimpl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* wasm: Make sure native fetch is destroyed before reply is canceled, closedLorn Potter2025-05-281-1/+1
| | | | | | | | | | | finished signal was being sent before native fetch was destroyed which, in some instances, was causing a crash. Fixes: QTBUG-136710 Pick-to: 6.9 Change-Id: I2134431cbf9af0511d888dc5db3f589f5259c88a Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
* wasm: Fix parsing HTTP header values that contain colon (:)Piotr Wiercinski2025-05-191-7/+9
| | | | | | | | | | According to RFC 7230 header values can contain colon(:). Fix parsing HTTP headers to handle such cases correctly. Fixes: QTBUG-136812 Pick-to: 6.5 6.8 6.9 Change-Id: I371342c5d84744e0427eb23fb1b648f8c0f0c9fe Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: introduce qwasmglobal_p.hMorten Sørvig2025-03-031-2/+2
| | | | | | | | | | | | | | Global helpers/utils for Q_OS_WASM. Move the thread proxying functions to qwasmglobal_p.h, and update calling code. qtstweb_p.h now contains C++ wrappers for native web API only. The proxying functions will be removed from qeventdispatcher_wasm in a later commit. Change-Id: I08a56c211b08929750970895b63ca48d4a07a0a1 Reviewed-by: Lorn Potter <lorn.potter@qt.io>
* Mark some security sensitive files in networkDimitrios Apostolou2024-12-021-0/+1
| | | | | | | | Following acceptance of QUIP-23. Done-with: Mårten Nordheim <marten.nordheim@qt.io> Change-Id: I0d5c816d6e3c2d25b2c6ad5384aba1f533ce0288 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: Fix integer overflow in FetchRequestPiotr Wierciński2024-09-161-5/+0
| | | | | | | | | | | | Remove code which is trying to unset flag that has never been set before. Subtracting flag on unsigned int "attributes" can cause integer overlow. Fixes: QTBUG-128929 Pick-to: 6.5 6.7 6.8 Change-Id: I4128819f29a841b73b6a08aeba795dcae9dc2e51 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: set status code before readyRead is sentLorn Potter2024-07-241-4/+4
| | | | | | | Pick-to: 6.8 6.7 Change-Id: I6f0360158cf6fe728eb49f61dc0ec819924e96e2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* Remove redundant qtimer.h includesAhmad Samir2024-06-111-1/+0
| | | | | | | | | | | | | | If QTimer isn't used in the file where it's included, remove the include. Fix files that depended on transitive includes. QMacPanGestureRecognizer: drive by change: classes inheriting from QObject should have Q_OBJECT macro in the definition. Change-Id: Ia8d71f4195a1ca643c9fcb14db41877413348d98 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* wasm: Allow fetching from background threadPiotr Wierciński2024-05-101-59/+118
| | | | | | | | | | | | | | | | | Allow network request from background thread by proxing it to main thread if needed. Introduce "fetchHelper" which is stored on heap and owns "outgoingData" which must be valid during entire fetch operation. It is also used for synchronization between thread that has scheduled fetch operation and the one that is executing it. Enable the test that was skipped before fix. Fixes: QTBUG-124111 Change-Id: Ifafa4c40fa435122639fa861a61fbf96340a7747 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Jøger Hansegård <joger.hansegard@qt.io>
* wasm: Abort network request on destruction of QNetworkReplyPiotr Wierciński2024-04-161-2/+7
| | | | | | | | | | Deleting QNetworkReply is a common way to cancel pending request. Wasm implementation was not treating it properly. Task-number: QTBUG-124111 Pick-to: 6.7 Change-Id: I46d8624e323fca0932411c575922415d9f9d7986 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* Network: cleanlinessMårten Nordheim2024-04-051-1/+1
| | | | | | | | | QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_BYTEARRAY QT_NO_URL_CAST_FROM_STRING Change-Id: Ic77ed8ccbdb146b7e7b26123923795f9748d3a38 Reviewed-by: Mate Barany <mate.barany@qt.io>
* NetworkReply[wasm]: simplify some buffer passingMårten Nordheim2024-04-051-4/+5
| | | | | | | | | | | | It was always passing a QByteArray to a const char * argument, with the size along with it. That was immediately converted back to a QByteArray. Instead, just pass the byte array which anyway knows its size. Needed for a followup commit Change-Id: I821d419adcb600456826dde67fb92ecad11cb290 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Revert "wasm: Proxy emscripten_fetch() to the main thread"Piotr Wierciński2024-04-051-5/+1
| | | | | | | | | | | | This reverts commit f2f2b6ef18907a76461b54e110618e7840971fa7. Reason for revert: There are couple of issues introduced. Lets revert to base revision and go with fixes from there. Pick-to: 6.5 6.6 6.7 Change-Id: I8341de42ef3e4a609bfbffdb763dd5c28794473c Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
* wasm: Dont access QNetworkReply header data through dangling pointerPiotr Wierciński2024-03-141-1/+1
| | | | | | | Fixes: QTBUG-122893 Pick-to: 6.5 6.6 6.7 Change-Id: I3768fdffaec7be4ec0b559fdb365600220e648d1 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: Proxy emscripten_fetch() to the main threadPiotr Wierciński2023-11-221-1/+5
| | | | | | | | | | | | | | Calling emscripten_fetch() on worker thread which never yields control back to the browser, will leave the fetch request pending forever. This can be a problematic for example in QML Loader, which tries to load resource by network. Proxy this function call to the main thread, so it can be processed by the browser. Fixes: QTBUG-118225 Pick-to: 6.6 6.5 Change-Id: I969d73f6a66670c4135960e08d2eedc8d2a6e5c3 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* network: use string view types moreAnton Kudryavtsev2023-09-061-1/+1
| | | | | | | Prefer QLatin1StringView overloads Change-Id: I23846761f2c93021de4f6e6b7eba1d74045f89a1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* wasm: fix networkreply with empty dataLorn Potter2023-06-141-1/+1
| | | | | | | Fixes: QTBUG-114078 Pick-to: 6.5 6.6 Change-Id: I78e6844ab1aa5d385d8c558c696299e7fa845f50 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
* Get http reply text on error in wasm's network replyMikolaj Boc2023-04-111-0/+2
| | | | | | | | | A failed response also carries response text. Read it and assign it to the response. Fixes: QTBUG-112474 Change-Id: I5565e3809e2c9c95bf8e0744b3ab15a62b07106c Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix default "credential" flag for WASM HTTP connectionsCajus Pollmeier2023-04-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | In some cases, you might want to set the "credentials" flag for HTTP requests. But you can't use it everywhere, because it may break the use of public APIs. As a result, you're running into Reason: Credential is not supported if the CORS header 'Access-Control-Allow-Origin' is '*' on the client side. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials for details. This commit restores the former default "false", in order to make WASM connections that worked prior 6.5 work again. Fixes: QTBUG-112478 Pick-to: 6.5 Change-Id: I46f6a374c07038608c3484ac831a1dc5999fb120 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QOffsetStringArray: add contains() methodMarc Mutz2022-12-091-12/+12
| | | | | | | ... use it in QNetworkReplyWasmImpl. Change-Id: I648f02fcafda43af7ed9771cc1c7e2e2a6d38504 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QNetworkRequest: don't assume QByteArray::constData() is NUL-terminatedMarc Mutz2022-12-081-8/+12
| | | | | | | | | | | | | | | | | | | | | It isn't guaranteed to be, for QByteArrays originating from QByteArray::fromRawData(). Use the four-arg qstrnicmp() overload (with defaulted fourth argument), wrapped in a lambda to DRY, instead of qstricmp(), which may produce incorrect results or even read past user-supplied buffers. There were also uses of QByteArray::compare(c-literal, Qt::CaseInsensitive). They're not affected by the problem, but QByteArray is scheduled to lose its string-y API parts and become a container of octets in the future. Besides, the lambda solution is much nicer on the eye. Pick-to: 6.4 6.2 5.15 Change-Id: I1e0f9003082f4158edecc6fe8cf3c0518e5403f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QNetworkRequest: Make header parsing locale-independentMarc Mutz2022-12-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing header parsing used C's tolower() function for case-insensitive switching over the first character of the header. However, that function's result depends on the current locale. Since the parser is supposed to match the likes of "If-Match" and "If-None-Match", matching may fail in locales, such as Turkish, where tolower(I) is ı (LATIN SMALL LETTER DOTLESS I) (or I, if the former isn't representable in the current charset), causing a False Negative. To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function, which has the added advantage that it's inline. Replace at(0) with front() as a drive-by. The WASM copy of the function is hopelessly outdated (recognizes less headers than the QNetworkRequest original). [ChangeLog][QtNetwork] Fixed a bug where certain QNetworkRequest::KnownHeaders wouldn't be recognized as such in certain locales. Pick-to: 6.4 6.2 5.15 Task-number: QTBUG-109235 Change-Id: Ib147ab64803bb868647dd07ad657d785071242ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Trim headers considered unsafe from the WASM net requestsMikolaj Boc2022-10-291-6/+49
| | | | | | | | | | | | | | | Some headers cannot be sent via XMLHttpRequest. In case one of those is assigned to a network request, the header will now be trimmed on WASM so that the request continues. Qt will print a warning on each request that had its headers trimmed. The list seems stable so it is not a lot of burden to sync Qt with it on potential (unlikely) changes. Fixes: QTBUG-95585 Change-Id: Id504ef43ad7e466ab567d4646d7ca00d6b7920d7 Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix crash when network reply is closedLorn Potter2022-10-191-5/+21
| | | | | | | | | | We do not need to call QNetworkReply::close as that closes the QIODevice that we do not use (or have) Pick-to: 6.4 Fixes: QTBUG-77210 Change-Id: I812bc324f49ae28b8c622cfa89f9690e012bf216 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: allow useCredentials access control to be setLorn Potter2022-09-281-0/+3
| | | | | | | | | | Introduce UseCredentialsAttribute that indicates whether the underlying fetch/XMLHttpRequest should use credentials https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials Fixes: QTBUG-90893 Change-Id: I2c43e286db52df387c0a22737d027b9a2a8dd2d3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* wasm: fix issue with passing username/password to network requestLorn Potter2022-03-101-3/+7
| | | | | | | | | | | The data scope was wrong, it needs to live beyond the attribute strut Change-Id: If1ceb4967fc1755d4968a69bcd9d82b234bd871d Done-with: Vincent Rouillé Fixes: QTBUG-101551 Pick-to: 6.3 6.2 5.15 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: David Skoland <david.skoland@qt.io>
* wasm: fix network reply error finished() signalingLorn Potter2022-03-051-0/+1
| | | | | | | | | | The network reply needs to send the finished() signal after any error. Change-Id: Iafc42d26f91241293042b72201eef2e88613e468 Fixes: QTBUG-101286 Pick-to: 6.3 6.2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QtNetwork: Include moc filesMårten Nordheim2022-01-151-0/+2
| | | | | Change-Id: I227a9541bf76c1c048a694f022b8fc419c0c2544 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* wasm: fix network reply status attributeLorn Potter2021-11-061-6/+11
| | | | | | | | | | We were emitting the finished signal before the status code attributes were being set. Fixes: QTBUG-97984 Pick-to: 6.2 5.15 Change-Id: Ib179898dee2b9667d482348ad12180e8bdef74db Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: don’t dereference null reply pointerMorten Johan Sørvig2021-08-261-40/+33
| | | | | | | | | | | | | | | | | | | Move all access to the reply inside the nullptr check, while making sure to still call emscripten_fetch_close() unconditionally where needed. Make all four Emscripten callback handlers have a similar structure where we check if the reply is not null and not in the Aborted state. (This removes one emscripten_fetch_t nullptr check in stateChage(), if it is really the case that Emscripten calls us with a null emscripten_fetch_t then we should add it back.) Pick-to: 5.15 6.1 6.2 Change-Id: Iadcbe6338c338cfeb8967490e0951d8b3e1ec5b3 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Hold QRingBuffer and QNonContiguousByteDevice in shared_ptrMarc Mutz2021-07-141-1/+1
| | | | | | | | | | | | ... instead of QSharedPointer. QSharedPointer performs twice as many atomic operations per pointer copy as std::shared_ptr, and this is private API, we're not bound by BC constraints, so we can port to the more efficient version. Change-Id: I9572a8321aae381e5dbe4a51119f2c9494a8fbc7 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: fix network crash on abortLorn Potter2021-06-051-44/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Also work around emscripten bug #8238 emcripten_fetch_close() does not abort the network request, but instead just free’s the emscripten_fetch_t object. onsuccess or onerror will still be called, but now with a stale pointer to the deleted emscripten_fetch_t object. See https://github.com/emscripten-core/emscripten/issues/8234 Work around this by setting the userData to null when we want to abort or are done with the request. The onerror and onsuccess callbacks can then check this field (on the the still valid emscripten_fetch_t), and bail out on the (from the Qt side) aborted request. Call emcripten_fetch_close() from on error and onsuccess; this should be the point when the emscripten request is done, and there will be no more callbacks. Pick-to: 5.15 Fixes: QTBUG-87813 Change-Id: Ie9b8a29037eb150c23741683588b0f0bfd5d8c63 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix network status code propagationLorn Potter2020-09-251-6/+13
| | | | | | | | Fixes: QTBUG-86620 Pick-to: 5.15 Change-Id: I911636739dc57e47bc2a07a583f4e67fc08b1b19 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix setTransferTimeoutLorn Potter2020-07-291-1/+1
| | | | | | | | | | WebAssembly does not need the http feature, but these functions were hidden behind that feature. Fixes: QTBUG-83867 Pick-to: 5.15 Change-Id: I7cd9aa73003f45ccbc2613c67c21e4067d6edddd Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix network headers logicLorn Potter2020-07-291-6/+8
| | | | | | | Fixes: QTBUG-85083 Pick-to: 5.15 Change-Id: Iaf0f3365ee20fe257f3edac0e1105bdfcc5ba0da Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: do not close QIODevice on errorLorn Potter2020-06-291-3/+0
| | | | | | | | | | | Closing it early means the user may get this message when reading data without checking for error: 'QIODevice::read (QNetworkReplyWasmImpl): device not open' Change-Id: I377fc3da68e9d9f14f8504ace5addbb4f8e3c539 Fixes: QTBUG-85176 Pick-to: 5.15 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix crash when getting error like 404Lorn Potter2020-06-201-1/+0
| | | | | | Pick-to: 5.15 Change-Id: Ia9b81aaa8b1e9ea6ab20b8c6ff6f197e95d46d7d Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix network reply timeout and error handlingLorn Potter2020-06-191-12/+21
| | | | | | | | Fixes: QTBUG-83728 Change-Id: Ib8184a497a028949eea20e9d189d79da51ccc290 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit b2e998d4678b82f823d24f3c97d78dec034f4e71) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* wasm: fix network POST data corruptionLorn Potter2020-06-111-5/+4
| | | | | | | | | | Emscripten does not like when the post data gets deleted in the local scope. Fixes: QTBUG-84685 Pick-to: 5.15 Change-Id: I17f9d5cc3253c26b42253daa68e2fbaccc48eaf6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* QtNetwork remove deprecated signalsTimur Pocheptsov2020-06-041-1/+1
| | | | | | | | | | Use 'errorOccurred' instead of 'error' and 'sslHandshakeErrors' instead of 'sslErrors'. Fixes: QTBUG-82605 Change-Id: I19d4845b16c7b636af7b0658d4fbbba4eef9d029 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* wasm: set status codes from network operationLorn Potter2020-05-251-9/+18
| | | | | | | Pick-to: 5.15 Fixes: QTBUG-83991 Change-Id: Ie1e88189bee8b6a9dc6cb2a721777a5e1032307a Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix heap crash when making multiple network callsLorn Potter2020-05-251-19/+22
| | | | | | | Pick-to: 5.15 Task-number: QTBUG-83991 Change-Id: I354934b53799f3eeb958395932bed18289b1e279 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix network download crashLorn Potter2020-04-291-1/+1
| | | | | | | | It seems it was defaulting to the indexdb filesystem, but it is not mounted. Fixes: QTBUG-83827 Change-Id: I1f81d790e5786fe41b59c0f41ca7f6025732c9b2 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: refactor network to use fetch APILorn Potter2020-03-261-201/+110
| | | | | | | | | | This has better support for threaded use, and gets rid of bind use. This requires emscripten 1.38.37 and above Task-number: QTBUG-76891 Change-Id: Ic30a6820c2ce945c314751c06cfc356914a71217 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-02-281-1/+1
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* wasm: add network object checkingLorn Potter2019-08-231-0/+18
| | | | | | | | This should help when things are moving fast, and downloads and network object are destroyed before the callbacks finishes. Change-Id: I1f65965bd61efc2e641d03eb071f23e684dd5c44 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* wasm: fix wide character data downloadLorn Potter2019-07-291-2/+4
| | | | | | | | Need to pass correct buffer size Change-Id: I19cb65114f49decc225cd807d59f1f08ad6b70c9 Fixes: QTBUG-76212 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add custom verb support for WASM HTTP requestsFelix Barz2019-07-031-0/+3
| | | | | | | | | | | | | The QNetworkReply implementation for Qt for WebAssembly now supports usage of the QNetworkAccessManager::sendCustomRequest, making it possible to send requests with custom verbs. [ChangeLog][QtNetwork][QNetworkAccessManager] Fixed QNetworkAccessManager::sendCustomRequest for Qt For WebAssembly. Fixes: QTBUG-76775 Change-Id: I9394ffef110fce4ed2c877893631bedc7631f71e Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: fix crash in case network js event becomes null or undefinedLorn Potter2019-05-271-10/+43
| | | | | | | | | | | also fix data progress Task-number: QTBUG-75489 Change-Id: I5222fda64d258a6ae78ba0ca20194b81c289c27e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix empty body on POSTLorn Potter2019-05-221-26/+6
| | | | | | | | this also optimizes network post method handling Task-number: QTBUG-75660 Change-Id: Ibb0d01f2cc2b2bc7802598c4f6f04b04882c12ca Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>