aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
Commit message (Collapse)AuthorAgeFilesLines
* Only warn about incompatible parameter types passed from QMLUlf Hermann2019-02-211-9/+22
| | | | | | | | | Throwing a TypeError is too drastic. We need to properly deprecate this pattern before we actually enforce the compatibility. Fixes: QTBUG-73943 Change-Id: I00313ad7aed4021a7368fd014e2bfc6443b177e3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix PropertyKey::isArrayIndexErik Verbruggen2019-02-191-1/+1
| | | | | | | | | PropertyKey::asArrayIndex has a hole at UINT_MAX, so make isArrayIndex have the same hole. Change-Id: I85d0f14680c27d018644056960d75d94aee68646 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Avoid unnecessary re-generation qml cache files in some circumstancesUlf Hermann2019-02-1810-40/+54
| | | | | | | | | | | | The map of name IDs to resolved types so far is copied several times during compilation and different compile passes see different copies of it. Compile passes may add things to the map, and if they do that on copies that are inaccessible to other code, we get nondeterministic results. Furthermore all the copies and pointers are confusing and inefficient. Fixes: QTBUG-69340 Change-Id: I43ad3cbeeec34f90e05570eddc901fe8aa64c709 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Don't crash the parser on certain kinds of bad inputUlf Hermann2019-02-181-2/+6
| | | | | | Fixes: QTBUG-72734 Change-Id: I92146ec517c6a26a67e13830618e137f2a3021c2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Check parameter types when invoking C++ functions from QMLUlf Hermann2019-02-171-9/+31
| | | | | | | | | | | | | | | We now check if the given parameters can be converted to the expected arguments of the function being invoked and throw a type error if not. Previously we would still invoke the method with random parameters. [ChangeLog][QtQml][Important Behavior Changes] The parameters passed to C++ functions from QML are now checked for compatibility with the expected arguments. If they cannot be converted, a type error is thrown in JavaScript and the function is not invoked. Fixes: QTBUG-73405 Change-Id: If16089510d314bb7cdb7d4db86478114c61281a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Fix failing assert on all 32bit platformsErik Verbruggen2019-02-141-1/+1
| | | | | | | | | | The failing assert is in qv4mm.cpp:170, which is correct. The failure stemms from the fact that on 32bit platforms, quint64 does not have the same size as quintptr. Who would have thought? Fixes: QTBUG-73821 Change-Id: I9abe6bc9e2bfcdb6700ab7997c078076a9883cf2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Fix JS tail call crashes on win32/linux32Erik Verbruggen2019-02-142-11/+6
| | | | | | | | | | | | For platforms where arguments are passed on the stack, we would do an invalid (off-by-one) calcultion to see where we should put arguments for a tail call, thereby overwriting other values. As we don't write to these memory locations anywhere, and the arguments are exactly the same as calls to jitted code (which is done by design), we could just as well re-use them. Change-Id: If4118b2023da6dc301252a1579a36df0e0cbc3a5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* PropertCache: Don't pass Q_GADGET value types as integersUlf Hermann2019-02-141-2/+2
| | | | | | | | We need to check for the IsGadget flag there. Fixes: QTBUG-73734 Change-Id: Ic4afd4215e6ed346bc40794d85397f0f262715e2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* DelegateModel: Zero foreign context objects when they are deletedUlf Hermann2019-02-142-1/+17
| | | | | | | | | If we keep plain pointers to objects we don't own, we need to zero them when something else deletes them. Fixes: QTBUG-73733 Change-Id: Ib4f3e144f10f70ab6cf44af4ffa62725470d3972 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Connect quit() and exit() signals with queued connectionsMichal Policht2019-02-131-2/+4
| | | | | | | | | | | | | | | | | | Class QQmlApplicationEngine connects QQmlApplicationEngine::quit() signal to QCoreApplication::quit() and QQmlApplicationEngine::exit() signal to QCoreApplication::exit(), but it does so with AutoConnection. This causes in some circumstances problems, which are described in Qt documentation (see QCoreApplication::exit()). This change modifies type of connections to queued connections. [ChangeLog][QtQml][QQmlApplicationEngine] QQmlApplicationEngine connects quit() and exit() signals with queued connections to avoid problems with AutoConnection, when connecting to QCoreApplication slots. Task-number: QTBUG-73649 Change-Id: Ib27738b5af2f879efee8862b1ca01613a2e8dc4e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Don't optimize global lookups if fast QML lookups are disabledUlf Hermann2019-02-133-2/+5
| | | | | | | | | | | If fast QML lookups are disabled, we generally want to look up by string. If the name then happens to be a member of the global JavaScript object, we still don't want to directly access that, as the name could have been overridden in a deeper context. Fixes: QTBUG-73750 Change-Id: Id16110969123d91501064ba46bfad4c2a39e4650 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QMLJS: Have ScanFunctions iterate over ArrayPattern nodesErik Verbruggen2019-02-052-0/+9
| | | | | | | | | | | | Like Codegen, have ScanFunctions iterate over the elements in an ArrayPattern, instead of recursing over the tail of the element list. This prevents running out of (native) stack, or hitting the recursion check limiter. Change-Id: I8203af3119ad50f19000a215af42649d9bcb3784 Fixes: QTBUG-73425 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Improve error messageRainer Keller2019-02-041-1/+5
| | | | | | | Show more datails about what actually went wrong. Change-Id: I418a4d1f433bd4d440fc34e9a4932a9ea010b174 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* doc: Two class members can not have the same nameRainer Keller2019-02-011-1/+1
| | | | | | | At least gcc complains about it. Change-Id: I122b0bab2c2fcea24814a83f005be1ad4686aa78 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Fix unwind handler reset after for-in loopErik Verbruggen2019-01-311-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this JavaScript snippet: function f() { for (var i in []) {} } This generates the following bytecode sequence: 2 0: 14 00 09 MoveConst r3, C0 3: ec 00 00 DefineArray (function), 0 6: da 00 GetIterator 0 8: 18 08 StoreReg r2 10: c0 0f SetUnwindHandler 27 12: 50 04 Jump 18 14: 16 0a LoadReg r4 16: 18 07 StoreReg r1 3 18: 16 08 LoadReg r2 20: dc 0a 09 IteratorNext r4, r3 23: 54 f5 JumpFalse 14 25: 50 03 Jump 30 27: c0 00 SetUnwindHandler <null> 29: c2 UnwindDispatch 4 30: 0e LoadUndefined 31: 02 Ret The problem is a normal loop exit: instruction 23 will not jump back, but fall through, and then instruction 25 will jump over the instructions resetting the unwind handler (27 + 29). Removing this jump fixes the issue. Change-Id: Ic9f03555ebebc27144490bce04e9a4166ed7c97c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Correctly scope unwind handlers for try blocksLars Knoll2019-01-301-3/+0
| | | | | | | | | | | | | Make sure the unwind handler is always reset when leaving the try block. This exposes a couple of failures in the ECMAScript test suite that were before passing by pure luck. Task-number: QTBUG-72858 Change-Id: I014b1e37c2beff136ecd53a665a2f10933f7e12c Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* Fix byte code register dump outputSimon Hausmann2019-01-291-1/+1
| | | | | | | | The first register allocated in bindings is typically the return address register, which was erroneously shown as argument 0 instead of register 0. Change-Id: I00add0b5b1cd08a4c9b1d42ffe79d2ea7e5a73cf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Bring behavior of String.replace() in line with other enginesLars Knoll2019-01-251-14/+25
| | | | | | | | | | | | | | | | "x".replace("x", "$1") gives "$1" in both JSC and V8, as there are no captures that could be used as a replacement for $1. Implement the same behavior as it's the most logical thing to do (even though it's undefined according to the spec). Two digit captures ($nm) work in a way that they get applied if $nm captures exist. If there are less than nm but more than n captures available $n is replaced by the n'th capture and m is copied over verbatim. Change-Id: I8b5f576f2c42c8334859ab7854dcdf07104dd35b Fixes: QTBUG-73152 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* MemoryManager: Only clear weak values onceUlf Hermann2019-01-231-2/+0
| | | | | | | | | | | | We want to keep the weak values alive while the destruction callbacks are running, so that they can still access them. We set them to undefined later anyway because we expect the destruction callbacks to mess with the values. Therefore there is no point in also setting them in between. Fixes: QTBUG-72137 Change-Id: I83f70230f5b4ad2761c74770f975b14a5ca71f18 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QQmlNotifier: Always keep the isNotifying flag when updating senderPtrUlf Hermann2019-01-232-20/+53
| | | | | | | | | | | When the sender gets deleted we still want to retain the flag that tells us that the notifier is currently active. Otherwise we can miss the error message about synchronously deleting objects while signal handlers are in progress. Task-number: QTBUG-73013 Change-Id: I8abba9b492327c15963d1875841c6822f345a89e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge "Merge remote-tracking branch 'origin/5.12.1' into 5.12" into ↵Liang Qi2019-01-222-20/+48
|\ | | | | | | refs/staging/5.12
| * Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-01-212-20/+48
| |\ | | | | | | | | | Change-Id: I1e0bbc35807bd0f7f96694539d2fbec0f83ddb16
| | * V4: Fix stack alignment in JITted codeErik Verbruggen2019-01-152-13/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Helper calls done for to-integer and to-number conversions did not align the stack on 16byte boundaries, which could lead to crashes if somewhere in that call a vector instruction is used that expects such alignment. Task-number: QTBUG-71325 Change-Id: Ieec05a93a1f69b538e6c8930b8eb64cbe85c35d4 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 3795904e3831722e222fa32a1e52aeb6b3e6ba87) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * When matching RegExps catch JIT failuresUlf Hermann2019-01-092-20/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Yarr JIT can generate code that fails to evaluate the RegExp at runtime. In that case we need to fall back to the interpreter. Also, don't needlessly cast the unsigned return value of RegExp::match to signed int before range-checking it. And fix some typos in the comments for the disassembler dumps. Fixes: QTBUG-72879 Change-Id: Ic8f80c076d6461d714816a9f66e1cac1d9b0c7a8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Documentation: Start using the \nullptr macroFriedemann Kleint2019-01-214-13/+11
|/ / | | | | | | | | | | Task-number: PYSIDE-903 Change-Id: I0c4640eb20157673eabb131e8834e79cbbf95d5c Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Annotate stack traces when frames are elided through tail callsErik Verbruggen2019-01-153-0/+8
| | | | | | | | | | | | Task-number: QTBUG-72407 Change-Id: I98b96852309fc783a945797185f666196513d24b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | QQmlMetaType: Erase attached properties in dtorUlf Hermann2019-01-151-4/+12
| | | | | | | | | | | | | | | | | | | | Also, make it more obvious that the attachedPropertyIds are a static member of QQmlTypePrivate. Fixes: QTBUG-72972 Change-Id: If0a28e034dd46d7127993ed15aed11c7641d580e Reviewed-by: Harald Hvaal <harald.hvaal@gmail.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix crash with qt.qml.binding.removal.info=trueNils Jeisecke2019-01-141-5/+8
| | | | | | | | | | | | | | | | | | For some bindings (qsTr) no actual javascript function exists and the debug output causes a null pointer access. Fixes: QTBUG-73009 Change-Id: I896fd2afd680dc5dee544a0c46ade6746f6727d8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Fix build error when building with -no-feature-translationUlf Hermann2019-01-111-1/+1
| | | | | | | | | | | | Change-Id: Ie97ae901283cf431fc38d238ddbc88a18bd630c8 Fixes: QTBUG-72352 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | V4: Fix stack alignment in JITted codeErik Verbruggen2019-01-102-13/+33
| | | | | | | | | | | | | | | | | | | | | | Helper calls done for to-integer and to-number conversions did not align the stack on 16byte boundaries, which could lead to crashes if somewhere in that call a vector instruction is used that expects such alignment. Task-number: QTBUG-71325 Change-Id: Ieec05a93a1f69b538e6c8930b8eb64cbe85c35d4 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Make sure JIT is disabled when building for ILP32 ABIDmitry Shachnev2019-01-091-1/+1
| | | | | | | | | | | | | | Change-Id: Id8d06ed3708fdb9d1470fd3f83c3069138988074 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix build with -c++std=c++11Ulf Hermann2019-01-081-2/+3
|/ | | | | | | | | | | The compile test for make_unique needs the C++ standard as argument in order to provide meaningful results. For C++ >= 14, however, we don't have to run the test at all as we are guaranteed to have make_unique. Therefore, we specialize the test for C++11. Change-Id: If13b1f825224a1e10841263c4de57d1b14cce650 Fixes: QTBUG-72904 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Doc: Fix link issuesNico Vertriest2019-01-033-4/+4
| | | | | Change-Id: I738b9da5335afb048d2eda2edf2be5095a91d7e5 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Quote stringified generic variants on JSON.stringifyUlf Hermann2018-12-201-1/+1
| | | | | | | | | | A string representation of those is unlikely to be actual JSON, and even if it is, we don't want to use it as such. Fixes: QTBUG-72674 Change-Id: I6815366a0176d9725ff4840d3fc545792ce00535 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* QML: When destroying a context, clear any pointers to itUlf Hermann2018-12-171-0/+2
| | | | | | | | | | | The "context" pointer in QQmlData can either point to ownContext, or to outerContext. In the latter case we need to clear it when the outerContext is destroyed. Fixes: QTBUG-72527 Change-Id: Ifbf358d405d6cec9868f67184ef887d1b70c90bc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix ICC warning about old-style scoping rulesThiago Macieira2018-12-121-2/+2
| | | | | | | | | | It's only been 20 years that the new style is the rule... qv4compileddata.cpp(206): error #823: reference is to variable "i" (declared at line 198) -- under old for-init scoping rules it would have been variable "i" (declared at line 204) Change-Id: I4ac1156702324f0fb814fffd156f80ecb6849ee8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QML: Fix registering and unregistering of context objectsUlf Hermann2018-12-124-13/+22
| | | | | | | | | | | | | | When we add a context object we need to include it into the list of contextObjects of its outer context, so that the outerContext member can be reset when the outer context disappears. On the flip side, we also need to remove it from this list when the object gets removed. We don't need to reset the inner context of an object when the outer context disappears, though. Fixes: QTBUG-72241 Change-Id: Ifd34650d852642a364df23b697d32e3961d0479b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-077-10/+82
|\ | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4script.cpp src/qml/parser/qqmljslexer.cpp Change-Id: I82252a8c504a4b77c45f4f8efe849ff9acb949fd
| * QML Lexer: Stop scanning template literals on closing '`'v5.12.0-rc2v5.12.0-rc1v5.12.0Ulf Hermann2018-11-191-1/+1
| | | | | | | | | | | | | | Fixes: QTBUG-71812 Change-Id: I93b99496a7572c0f5128c69b865bb2b4f87d29af Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * Initialize Qt_AllocaWrapper allocation with zeroesJanne Koskinen2018-11-181-1/+1
| | | | | | | | | | | | | | | | | | | | YarrJIT generated ASM assumes the data to be zeroed. In the wrapper we allocate from heap where there can be random data. It needs to be initialized to zero. Task-number: QTBUG-71663 Change-Id: I67c04e7b6d4bf4b92124aedc4f7bcfdc1a43c833 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Generate lookups into the global object more aggressivelyLars Knoll2018-11-165-8/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since change 9333ea8649838d7e0400b0e94c8cbd4fa5d216b0, we lookup properties in the QML context object before the global object to have proper scoping rules for QML. Unfortunately this lead to a performance regression when using global properties such as Math in imported script files, as the lookup would always go through the qml context first. This can be fixed, as we know that the global object is frozen in qml mode, and the standard names of properties in the global object are illegal to use in QML. So simply check for those names in the code generator and create lookups into the global object for those. Change-Id: I4b2089178c9e5f9440abdfd834cf7d92c3c0e2c3 Fixes: QTBUG-71591 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | Fix line number reporting in scripts when lookups are enabledSimon Hausmann2018-12-031-0/+1
| | | | | | | | | | | | | | | | | | | | For regular object property lookups, we correctly store the byte code instruction pointer that allows us to determine the correct line number in case of a reference error. We need to do the same for lookups in the global object. Change-Id: I0f44dd06b5f66df9626576eeaa802b18fa4a26cd Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QML: Also clear outerContext's contextObject on destructionUlf Hermann2018-11-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A QObject can not only be set as contextObject of the own context, but also as contextObject of the outerContext of a respective QQmlData. This can be seen in QQmlObjectCreator::createInstance(...) if isContextObject is true. Therefore, when catching a QObject deletion we need to clear the pointer in the outerContext if that refers to the object being deleted. Fixes: QTBUG-71037 Change-Id: Ib6ba99bd5336f7582486b2128515021245370c60 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix parsing of js files via Qt.include()Simon Hausmann2018-11-294-24/+6
| | | | | | | | | | | | | | | | | | | | | | Make sure to parse them as JavaScript, not as QML, so that certain keywords such as char or double map to identifiers as expected. Also removed an unused function. Fixes: QTBUG-71524 Change-Id: Ie8a8dabe717ee12def6af512943e6d01efcf9876 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | JS: Limit expression and statement nesting levelErik Verbruggen2018-11-295-3/+64
| | | | | | | | | | | | | | | | | | This is to prevent extremely deeply nested expressions and statements make the code-generator run out of (native) stack space. Task-number: QTBUG-71087 Change-Id: I8e1a20a361bff3e49101e535754546475a63ca18 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix stale QML cache files when using assets:// on AndroidSimon Hausmann2018-11-291-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the "source file system" cannot provide us with a reliable time stamp for a .qml file, do not try to save a cache file to disk. Otherwise we may end up with stale cache files that are loaded despite the source having changed. We used to fall back to the app binary time stamp, but that was needed before we correctly stored the time stamp of resources in the qrc data. Fixes: QTBUG-68736 Change-Id: I8c2f8939d253472ce8bc1e3a59e8142d21f07539 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Richard Weickelt <richard@weickelt.de>
* | Fix failing assertion in memory pool allocator in large QML scenesVitaly Fanaskov2018-11-281-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the previous implementation MemoryPool wasn't able to allocate more memory than predefined block size (8 kB). Now, if a user tries to allocate more memory than default block size, the block size will be increased for current block only. All remain space in a new block will be used according to the current allocation strategy. Increasing block size of some certain blocks doesn't lead to reallocation of the entire memory pool. Also this situation happens very rarely, e.g., when compiling something contains more than approx. 2500 objects. Also fixed some warnings and used more casts in C++ style. Fixes: QTBUG-71195 Change-Id: I65d57959849f282178cffc92285a6a32f6bb9b25 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Fix qmlplugindump version dump issueMichal Policht2018-11-231-5/+10
| | | | | | | | | | | | | | | | | | | | Changed major and minor version of created QQmlType. Using major and minor version of a candidate instead of major and minor versions passed to a function. Task-number: QTBUG-67292 Change-Id: I2c30f5e8f49aa0be3a1d5b404ab16eb376ad8092 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Improve documentation of QML's handling of dates and timesEdward Welbourne2018-11-232-4/+17
| | | | | | | | | | | | | | | | | | | | Encourage use of QDateTime in preference to QDate. Explain the problems of converting plain dates to date-times. Include times in the examples. Change-Id: I12731a9f80a833c41385f787336d1ba60a6fa4d3 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Martin Smith <martin.smith@qt.io>
* | V4: Avoid copying WeakValues with wrapped QObjectsUlf Hermann2018-11-222-4/+9
| | | | | | | | | | | | | | | | | | | | | | Such WeakValues are kept alive until the respective QObject is deleted. Therefore they are quite expensive. In this case we don't actually need a copy as on retrieval we only want a ReturnValue and on inserting we just want to replace the value in the map. Fixes: QTBUG-71817 Change-Id: I385c55140337d468289046243941077ba1ff61a3 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>