aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4promiseobject_p.h
Commit message (Collapse)AuthorAgeFilesLines
* V4: Slim down FunctionObjectUlf Hermann2024-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most FunctionObjects do not actually need their custom jsCall members. They will only call the functions from the vtable anyway. FunctionObject can therefore be split into a static and a dynamic variant. Only the dyanmic variant needs to carry (and invoke) the extra pointer. The jsCallWithMetaTypes pointer is completely pointless because none of the dynamic functions actually implement it. Furthermore, the QV4::Function and QV4::ExecutionContext pointers in FunctionObject are only needed by actual JavaScript functions. The builtins that like to be dynamic functions never need them. Therefore, split out another class for this. In the generic FunctionObject, we need the capability to decide at run time whether the function shall be a constructor or not. Add a flag to replace the check for jsCallAsConstructor. Also, where we can, avoid the pessimization of checking whether a function is a constructor before trying to call it as constructor. Rather have the default implementation throw the exception. As a side effect, for most functions we don't need an ExecutionContext anymore. The engine is enough. Task-number: QTBUG-124662 Change-Id: Iac657fa71288dd6ec230a33de2986ba3bcf4628c Reviewed-by: Fabian Kosmale <[email protected]>
* Remove the use of Q_QML_PRIVATE_EXPORTAlexey Edelev2024-01-111-1/+1
| | | | | | Task-number: QTBUG-117983 Change-Id: I5790f01d614cd70c7fcc9bd817ec6ace3f3e3730 Reviewed-by: Ulf Hermann <[email protected]>
* Avoid both virtual and override on destructorsJohannes Kauffmann2022-08-281-1/+1
| | | | | | | | | | | Destructors don't need to be declared virtual when the destructor from the parent class is already declared virtual. Additionally, this removes the last usage of Q_DECL_OVERRIDE. Pick-to: 6.4 Change-Id: I7d43f5d5fbb1423319adde04d4994ada9daab6b1 Reviewed-by: Volker Hilsheimer <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-06-111-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. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <[email protected]>
* Fix promise chainingFabian Kosmale2019-07-101-2/+5
| | | | | | Fixes: QTBUG-71329 Change-Id: I261b25ff281bb44d03650ab05258743f104f3cc9 Reviewed-by: Ulf Hermann <[email protected]>
* Add missing "We mean it." warningLiang Qi2018-10-241-0/+11
| | | | | Change-Id: I19ca6e366cb8b2ca069ac2f4b2c2c834bcea8f3d Reviewed-by: Simon Hausmann <[email protected]>
* QML Engine: Support for JavaScript PromisesValery Kotov2018-10-111-0/+263
Support for JavaScript Promises. Change-Id: I90ce328b35f3bdf3fd666a8829f22b5d56b6f861 Reviewed-by: Simon Hausmann <[email protected]>