aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlcomponent_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QQmlEngine: Set translationsDirectory in loadFromModuleOlivier De Cannière2024-03-211-0/+5
| | | | | | | | | | | In the process, loadFromModule had to be split in two parts. The type resolution has to happen so that the translationDirectory can be set and the translations have to be loaded before loading the actual module. Pick-to: 6.7 6.5 Fixes: QTBUG-116589 Change-Id: Ife7999f418ba35bfb0eed9050198e5a886fa74ae Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove the use of Q_QML_PRIVATE_EXPORTAlexey Edelev2024-01-111-1/+1
| | | | | | Task-number: QTBUG-117983 Change-Id: I5790f01d614cd70c7fcc9bd817ec6ace3f3e3730 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QML: Let IDs in outer context override bound components' propertiesUlf Hermann2023-12-041-4/+1
| | | | | | | | | | | | | | | | | | This is necessary to make the usage of such IDs actually safe. If we let local properties override outer IDs, then adding local properties in later versions invalidates the ID lookups. [ChangeLog][QtQml][Important Behavior Changes] In QML documents with bound components, IDs defined in outer contexts override properties defined in inner contexts now. This is how qmlcachegen has always interpreted bound components when generating C++ code, and it is required to make access to outer IDs actually safe. The interpreter and JIT have previously preferred inner properties over outer IDs. Pick-to: 6.6 6.5 Fixes: QTBUG-119162 Change-Id: Ic5d3cc3342b4518d3fde1b800efe1b95d8e8b210 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlComponent: Resolve inline components by name rather than IDUlf Hermann2023-05-261-2/+3
| | | | | | | | We can always easily determine the name. In order to determine the ID, we first have to compile the outer component. Change-Id: Idd87d6a3dd35069cbd2fe2d99b1f69d15c53832a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlComponent: Remove pending QProperty bindings in old createObject()Ulf Hermann2023-05-121-1/+4
| | | | | | | | | | | | | When calling the QQmlV4Function overload of createObject() we end up in a different code path. The problem is the same, though. Amends commit ef6e9f6b75848dfdacdd98cf9e7530f651b3dfca. Pick-to: 6.5 Task-number: QTBUG-99363 Change-Id: I6341243b75d9db1e0fcb80d8d73dab6932d85fd2 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QtQml: Check CU for null on isBound()Ulf Hermann2023-03-171-1/+2
| | | | | | | | | | | If the component has an error or was clear()'d its CU will be null. Since isBound() is a public method, it should take that into account rather than just crash. Pick-to: 6.5 Change-Id: I4a3e7417da3c87f6ce7dbb615f984815bc2b0b0b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Key required properties by object and property dataUlf Hermann2022-11-281-3/+6
| | | | | | | | | | Property data alone is not enough as the same property can be required in multiple objects. Fixes: QTBUG-108291 Change-Id: I3b1c899e24bb2967d05372701f9b5d0927b3c711 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlComponent::loadFromModule: Support inline componentsFabian Kosmale2022-11-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | QQmlComponent already has support to load sub-objects in a QML file (which is necessarry for the QtQml Component type). We repurpose the same code path to load inline components. However, we need to remember that we are dealing with an inline component (instead of a Component), as the QmlObjectCreator requires a specific flag to correctly instantiate the inline component in that case. Everything else is however handled by calling QQmlComponent::load with the URL of the outer type. Except for one additional gotcha: The QQmlType of the inline component might only contain a placeholder id if the outer component has not been loaded so far (as we cannot possibly know the object's id inside the file without compiling it). To get the correct id, we force synchronous loading if we detect that we've gotten a placeholder type (id <= -2). In the future, we might want to remember either the URL or the QQmlType to avoid forcing a synchronous load. Then we could set "start" to the correct object id in beginCreate. Change-Id: I20209e9389d0a64d2a07c2fb1bc9cbc430668040 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* ConstructionState: reduce sizeFabian Kosmale2022-11-101-16/+74
| | | | | | | | | | | | We can reduce the size of the class by using QBiPointer to internally store what previously has been two pointers and a flag. The only draw-back is that we now have to manually manage the memory. Mark the type as uncopieable to reduce the amount of boilerplate we need; we still need to support moves as we store ConstructionState in a vector. Change-Id: I99329bbfda3f7147d475c1574a20a54719d2f7bd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* ConstructionState: Make completePending private, tooFabian Kosmale2022-11-101-64/+100
| | | | | | | | | And move all functions out of the class body to make it easier to see at a glance which methods are defined in the class. Change-Id: I2c64b3220b31bed1a1322ddba7010ede6b2452ab Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* Required properties: Use pointers instead of referencesFabian Kosmale2022-11-101-9/+10
| | | | | | | | | | | | This allows for a more natural handling of the case where there are no required properties, and will enable further refactoring of ConstructionState. Unfortunately, we lack a way to mark pointers as always non-null in Qt, else we could mark all required property pointers originating from QQmlObjectCreatorSharedState as such. Change-Id: Icaccb27654130fb57daf924bb44a70a5cf114fed Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlComponent: Remove required components accessorFabian Kosmale2022-11-101-1/+18
| | | | | | | | | | | | | Instead, access it directly via state. Also, introduce a hasUnsetRequiredProperties helper function to simplify a few checks, and a addPendingRequiredProperty heper function to indicate places where we actually insert new entries to the list. This is a preparation to further refactor the handling of required properties in QQmlComponent. Change-Id: I25f5ef45be0b3508cf5b0f82a666d33610d5810d Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QQmlComponent::loadFomModule: handle required propertiesFabian Kosmale2022-11-101-0/+9
| | | | | | | | | | | | | | Add support for handling required properties in types created via QQmlComponent::loadFomModule which are backed only by C++. We check all properties in the QQmlPropertyCache for their requiredness; we could also attempt this via the QMetaObject, but the assumption here is that for a QML object we want the property cache anyway in the near future. Reducing the size of the ConstructionState which now stores the RequiredProperties is left as an exercise for another commit. Change-Id: I2e6f67f809ac2cbddbe2b28614ed98cee066fc61 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* ConstructionState: Add helper function to take errors from creatorFabian Kosmale2022-11-101-4/+22
| | | | | | | | | As a drive-by, let AnnotatedQmlError's ctors take the QQmlError by value, and move-construct it into the member. Change-Id: I4c7aea5a966cfdb45abdc74ee352d5dd41b73aba Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlComponent::ConstructionState: encapsulate creatorFabian Kosmale2022-11-101-1/+17
| | | | | | | | | | | This is a preparatory step to decouple accessing required properties from the existence of a QQmlObjectCreator (which will not exist when existing pure C++ types). Task-number: QTBUG-97156 Change-Id: I5323b018022e99f9ebf9be61d6f9a75b8a5dad48 Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Long live QQmlComponent::loadFromModule!Fabian Kosmale2022-11-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loadFromModule is conceptually similar to loadUrl, except that it does load the Component from a QML module URI and a typename instead of an URL. One big difference is that it allows loading types registered in C++, which is not possible via URLs, as those types do not have any. The implementation piggy-backs on the existing functionality of the QQmlTypeLoader: We first add the URI as an import. Then we resolve the QQmlTypeModule matching the URI. For a C++ registered type, we can already find the existing QQmlType there. As we don't store the QQmlTypes for composite types theree, we might however not find the type, even if it exists. To handle that case, we then use QQmlImports::resolveType. This is not too costly, as import and module resolution get cached. For composite types, we then retrieve their URL, and simply fall back to loadUrl. This could be optimized, but is done in the simplest way for now. For C++ registered types, we store the QQmlType in the component instead. Doing that allows us to use QQmlType::createWithQQmlData in QQmlComponent::beginCreate. Compared to loadFromUrl there are a few additional failure modes: attempting to load singletons, querying non-existing modules, or asking for non-existing types in a module. Those all result in component entering an error state. The API ignores revisioning – it is questionable whether we want to support it, or if we can live with only resolving to the latest version. Adding support for it at a later point would be easy; one would simply need to pass a QTypeRevision through the various APIs. There are two remaining tasks after this patch: We do not validate required properties for C++ types with this approach, and we cannot load inline components. Both will ba addressed in follow up patches. Task-number: QTBUG-97156 Change-Id: If3ed74a499f49c668524d917089a0c237c4ddaf8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QtQml: Remove unused includes in qml, final partSemih Yavuz2022-09-141-3/+0
| | | | | | | | | | | | | | Drop unnecessary includes detected by clangd-iwyu. Add new includes due to the transitive includes. Also, some of the includes were detected as unused even if they were actually in use. In those cases, use angular brackets instead of "" which deceives the tool not to complain. Affected subfolders: JsRuntime, Qml Fixes: QTBUG-106473 Change-Id: I483da15d42a8e3ce6cd3b654909665fff3075d6b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Do not store instantiation errors in QQmlComponentAndrei Golubev2022-06-301-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlComponent::createWithInitialProperties() allows to pass non-existent properties to create the object with. In this case, we still return a valid pointer (pre-existing), however, the state of the component is affected: there are errors internally that fail repeated calls even with valid properties specified. Fix this, aligning to the behavior of QQmlComponent::createObject() which is a QML counterpart of the same function (to a degree) Additionally, make required properties warnings also not break the component state: if a required property is not set, we return nullptr instead of object. The error state is affected but it gets cleaned on the next creation call, allowing one to set the missing required properties Unify the logic (with slight deviations) between create() (the non-incubator-accepting version), createWithInitialProperties() and createObject() as all they all should do roughly equivalent things [ChangeLog][QQmlComponent][Important Behavior Changes] Setting properties via createWithInitialProperties() and setInitialProperties() no longer affects the QQmlComponent's error state unless there are unset required properties. A warning is issued when a property could not be set. Fixes: QTBUG-101439 Change-Id: I814c00bc3715d7a54004c3fcd0af6ee6d50b0726 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* 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 <shawn.rutledge@qt.io>
* QML: Add an option to bind components to filesUlf Hermann2022-05-231-0/+4
| | | | | | | | | | | | | | | If a component is bound to a file context, we can be sure that the IDs present in the same file will be accessible to bindings and functions inside the component. We will need this to allow such bindings to be compiled to C++. [ChangeLog][QtQml] You can now bind components to a file scope. This way you can make sure IDs in the file are accessible to the components. Task-number: QTBUG-101012 Task-number: QTBUG-102806 Change-Id: I290a61752b4b02e13f0bb0213ba3f871bdb95260 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlDelegateModel: Consider only top level required propertiesUlf Hermann2022-05-171-1/+1
| | | | | | | | | Required properties deeper inside the delegate must not suppress the passing of model data via the context. Fixes: QTBUG-103479 Change-Id: I2d350d93633a87b90e7a7d08b1e26a06a966b24a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Avoid ping-pong between plain pointers and QQmlRefPointerUlf Hermann2022-01-251-1/+1
| | | | | | | | | | | | | | | We want to deal in QQmlRefPointer as much as possible. In particular, assigning nullptr to a QQmlRefPointer triggers the creation of an empty QQmlRefPointer and the assignment of that one. Provide a reset() method to do this in a cleaner way. In turn, make QQmlGuardedContextData::reset() private. It's really dangerous and should not be called from outside. setContextData() is safer but may do additional work. The only place from where reset() was previously called in its public capacity is probably dead code, though. Change-Id: Idb72e255dbfad6e5dd963dc76d719bb9edc10471 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlComponent: Make it harder to leak deferred statesUlf Hermann2021-11-011-17/+3
| | | | | | | | The previous pointer wrangling was ripe with foot guns. Let's just use a vector of unique_ptr to keep track of the states. Change-Id: I3ae225b3ab8644aa690d506d0a5de0bfb9ecce23 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Improve type conversions from/to QJSValueUlf Hermann2021-10-201-1/+3
| | | | | | | | | We can convert everything into a QJSValue if we have an engine and we can save a binding function in a QVariant by wrapping it into QJSValue. Change-Id: I48e7c13f3f744f1c50bf673b427fe9331250f313 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove unused QBitField classFabian Kosmale2021-03-041-1/+0
| | | | | Change-Id: I441dc66a94656afdea6569dcdde1bdf8e701213b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Encapsulate QQmlContextDataUlf Hermann2020-03-231-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This class is not a private detail of QQmlContext. And it is incredibly hard to see who owns what in there. Let's add some civilization ... We enforce refcounting for QQmlContextData across the code base, with two exceptions: 1. QQmlContextPrivate may or may not own its QQmlContextData. 2. We may request a QQmlContextData owned by its parent QQmlContextData. For these two cases we keep flags in QQmlContextData and when the respective field (m_parent or m_publicContext) is reset, we release() once. Furthermore, QQmlContextData and QQmlGuardedContextData are moved to their own files, in order to de-spaghettify qqmlcontext_p.h and qqmlcontext.cpp. When the QQmlEngine is deleted, any QQmlComponents drop their object creators now, in order to release any context data held by those. Before, the context data would be deleted, but the object creators would retain the dangling pointer. [ChangeLog][QML][Important Behavior Changes] QQmlContext::baseUrl() does what the documentation says now: It prefers explicitly set baseUrls over compilation unit URLs. Only if no baseUrl is set, the CU's URL is returned. It used to prefer the CU's URL. Change-Id: Ieeb5dcb07b45d891526191321386d5443b8f5738 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* qquicklistview: support required properties in sectionDelegateFabian Kosmale2019-09-121-0/+1
| | | | | | | | | | This changes the accessibile properties in the sectionDelegate: If the sectionDelegate contains requiredProperties, "section" will not be injected into a newly created parent scope. Instead, the section property of the delegate will be set if it exists. Change-Id: I34b04d08d2f80af7ea53fd722f08be0f9aea6e72 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Introduce required properties to QMLFabian Kosmale2019-09-091-2/+5
| | | | | | | | | | | | | | | | | | | [ChangeLog][QtQml] "required" is now a (contextual) keyword in QML, and users can mark properties with it to specify that those properties must be set when the component gets instantiated. This can be done either declaratively via standard property bindings from QML, or imperatively by using the functions to set initial properties (QQmlCompoent::setInitalProperties and related functions in C++, Qt.createObject, Loader.setSource,... in QML/JS). Logic has been added to QQmlComponent::create and the various QQmlIncubator classes to verify that the required properties were set. If properties marked as required are not set, a warning will be printed at runtime, and the component will not be created. Change-Id: I8e38227fc8f173b053b689c1597dc7fd40e835e7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Introduce functions to set properties during creationFabian Kosmale2019-08-191-0/+3
| | | | | Change-Id: Idd4c8ab9e34b9bc3e00f21d7cf1e4f1a70586e7f Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Disentangle includes and namespacesUlf Hermann2019-07-111-0/+1
| | | | | | | | Avoid using namespace in headers and include only the headers we actually need. Change-Id: I526a0f874dc09b07693fd87070665be396d3b637 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Split CompiledData::CompilationUnit in twoUlf Hermann2019-05-161-1/+1
| | | | | | | | We need a CompilationUnit that only holds the data needed for compilation and another one that is executable by the runtime. Change-Id: I704d859ba028576a18460f5e3a59f210f64535d3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Allow DelegateModel-based views to support multiple delegate typesPaolo Angelelli2018-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a specific abstract QQmlComponent subclass, QQmlAbstractDelegateComponent, and a default implementation, DelegateChooser, that, together with the type DelegateChoice allows determining the delegate type by role and/or index. The patch also adds QQmlAbstractDelegateComponent support to QQmlTableInstanceModel, that is a simplified version of the delegate model, currently only used in the new table view. DelegateChoosers are intended to behave just like Components in the context of the view. This means that they can be declared outside of the view, and also in separate files, and the same delegate component can be used at the same time in multiple views. [ChangeLog][QtQuick][Item Views] Added a DelegateChooser Component to host DelegateChoice instances to choose different delegates in an Item View (e.g. TableView) depending on model roles. Done-with: Michael Brasser <michael.brasser@live.com> Task-number: QTBUG-26681 Change-Id: Ibe24a31daf9142c8a9ff45ef6c65da0aec8a14dc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Allow partial creation of more than 10 QQmlComponent instancesRichard Weickelt2018-05-181-2/+1
| | | | | | | | | | | | | | | | | | | The recursion detection in QQmlComponent erroneously triggered when calling beginCreate() on >= 10 different instances. This may happen by intention and is not necessarily a sign of recursion. Since beginCreate() does never invoke a potentially nested Qt.createComponent(), but completeCreate() does, it is better to modify the creationDepth counter in completeCreate(). This also leads to simpler code. The test, however, can remain in beginCreate(). Task-number: QTBUG-47633 Change-Id: If413a8b08421d321d6a426ec16600996cb3f6ea1 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Clean up manual reference of QQmlTypeData and QQmlPropertyCacheSimon Hausmann2018-04-261-3/+3
| | | | | | | | | | | | | | | | | | | | | | | We have a few places in the type loader where we do adventurous manual reference counting, where getType() returns a raw pointer that has been addref()'ed and then sometimes somehow we call release() later. Commit 0b394e30bba4f6bb7e6f7dbe5585a2e15aa0f21d is an example of where this can easily go wrong. As a consequence and also in preparation for future work on the type loader, this patch starts replacing the manual reference counting there. Changing the return type from QQmlTypeData *getType() to a QQmlRefPointer<> itself is not sufficient though, as the implicit operator T*() will still allow the caller to store the result as a raw pointer. Therefore this patch removes the "unsafe" implicit extraction operator. As a result of that change, other types that are sometimes stored in QQmlRefPointer are also affected and their usage needs to be adapted to QQmlRefPointer usage or manual raw pointer extraction with .data(). Change-Id: I18fd40634047f13196a237f4e6766cbef3bfbea2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-241-2/+11
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmltypenamecache.cpp Done-with: Ulf Hermann<ulf.hermann@qt.io> Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
| * Fix execution of deferred propertiesJ-P Nurmi2017-10-181-2/+11
| | | | | | | | | | | | | | | | | | | | | | When deferred properties were assigned in multiple contexts, only the outermost context was executed. Any deferred property assignments in other inner contexts were never executed. Collect the deferred data to a container to be able to execute them all. Task-number: QTBUG-63200 Change-Id: I88fab27c1f81b5188430ada086dcc19842507e99 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QQmlComponent: Move incubateObject from QQmlDelegateModel to ↵Robin Burchell2017-05-031-0/+7
|/ | | | | | | | | QQmlComponentPrivate This feels like a slightly tidier encapsulation. Change-Id: Iff6c05e1fe7fbc6bb1ec58a7ea42d32ee03187df Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Qml: add missing 'override'Anton Kudryavtsev2016-10-061-2/+2
| | | | | | | ... and drop redundant 'virtual' Change-Id: I8c0d589557f590eb528e80414d9c002504ccb12a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Expose QQmlComponentPrivate::setInitialProperties()J-P Nurmi2016-06-151-0/+1
| | | | | | | | | | | QQuickStackView::push() can be used to push not only URLs or Components, but also plain Items. This patch makes it possible for StackView to initialize properties for plain Items without having to create a useless QQmlComponent instance just to be able to call initializeObjectWithInitialProperties(). Change-Id: Id538028d09c1319da56b26695ebd407f4c0fa27a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use automatic refcounting for the compilation unit in QQmlComponentPrivate ↵Simon Hausmann2016-06-031-2/+2
| | | | | | | and the incubator Change-Id: I70d609ce282a537b67a5e7c01c12d9ce65995133 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QQmlCompiledData in favor of QV4::CompiledData::CompilationUnitSimon Hausmann2016-06-011-3/+2
| | | | | | | | | QQmlCompiledData used to contain the binary data for instantiating QML types in the QML VME. Nowadays the QML type compiler as well as the JavaScript compiler create a QV4::CompiledData::CompilationUnit. Change-Id: I155f62a5ecfb55a3fe230520231b6d8fd5b28ac9 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-1/+1
|\ | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_profiler/qqmlprofilerservice.cpp src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4engine_p.h Change-Id: I89ffccd699bee675732758d039e22224b275d60d
| * Fix crashes when incubating objects asynchronously with initial propertiesSimon Hausmann2016-05-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This is a regression from commit 94e337fa95425d259e81b4d21f4d0853108553bd where we accidentally ended up not having a calling QML context set anymore when initializing the properties on newly incubated objects as provided by the caller. The QML context is necessary as for example when we set a URL property, the URL can be relative and it will be resolved to the base url of the context when written, such as in in QQmlPropertyPrivate::write. Change-Id: I1d896381fc92f653a7d76f4d82174bca48828f5e Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Remove dead fwd-dclFrank Meerkoetter2015-12-151-2/+0
|/ | | | | Change-Id: Ifd9fe32b80cd1ebc8dc9fda7c252ecdaae42cb37 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Avoid firing up the JS parser/JIT/interpreter when instantiating objectsSimon Hausmann2015-08-161-1/+1
| | | | | | | | For setting the initial properties there's no need to run a JavaScript function. Change-Id: I129fa8e7128cd7aa784e34912ce636cd33b1dd66 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Get rid of most uses of ValueRefLars Knoll2015-01-231-1/+1
| | | | | | | | | | | | Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>