aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-021-0/+8
|\ | | | | | | Change-Id: I41ca9120a470a905c2f5c168c1de4cf970fa0fff
| * Disallow registration of types beginning with lowercase lettersMitch Curtis2018-01-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allowing types with lowercase names causes ambiguity, as can be seen in QTBUG-43567 and the comment in IRBuilder::visit(), which explains that "the grammar can't distinguish between two different definitions" whose only difference is casing of the first letter. - Prevent registration (return -1 with e.g. qmlRegisterType()) when a type name doesn't begin with an uppercase letter. - Document the uppercase type name rule in more places. Change-Id: I4e522c65990f418eaafa45a256e3cb07a3e01ba4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-314-0/+17
|\| | | | | | | Change-Id: Idde38761897f078cd9957f01d34a9751217e4c53
| * Fix segfault when alias target refers to lowercase-named typeMitch Curtis2018-01-274-0/+17
| | | | | | | | | | | | | | | | | | Create an error via QQmlCompileError and return it instead of asserting. Task-number: QTBUG-43567 Change-Id: I0c0741943d30516379eff5f44ed8618a0f0116a4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-244-0/+44
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/compiler/qv4codegen.cpp src/qml/compiler/qv4compileddata_p.h src/qml/debugger/qqmlprofiler_p.h src/qml/jsruntime/qv4engine.cpp src/qml/memory/qv4mm.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlobjectcreator.cpp src/qml/qml/qqmlobjectcreator_p.h src/qml/types/qqmldelegatemodel.cpp src/quick/items/qquickitem_p.h src/quick/items/qquickwindow.cpp tests/auto/quick/touchmouse/BLACKLIST tests/benchmarks/qml/holistic/tst_holistic.cpp Change-Id: I520f349ab4b048dd337d9647113564fc257865c2
| * Fix crash when accessing a deleted objectMitch Curtis2018-01-112-0/+36
| | | | | | | | | | | | | | | | | | In QObjectWrapper::query(), return QV4::Attr_Invalid if the object was deleted. Task-number: QTBUG-44153 Change-Id: I53e8be6196489c323b190dbfa20d2dda2a54315e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Fix segfault on invalid property alias syntaxMitch Curtis2018-01-043-0/+8
| | | | | | | | | | | | Task-number: QTBUG-64798 Change-Id: Id1eb434f83ec89c5ea1ebaa4d8ec86fce9f4428f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-041-0/+152
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/memory/qv4mm.cpp src/qml/memory/qv4mmdefs_p.h src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp Change-Id: I7021fa1edf076627a67048f41f7b201220262b09
| * More fine-grained deferred property executionJ-P Nurmi2017-11-251-0/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows Qt Quick Controls 2 to defer the execution of certain building blocks until needed. For example, a button control can defer its background item so that the default background is not executed at all when replaced by a custom background. First of all, this gives a massive performance boost for customized controls. Secondly, this avoids the most burning issue in QQC2, problems with asynchronous incubation ("Object destroyed during incubation"). Task-number: QTBUG-50992 Change-Id: If3616c9dac70e3a474a20070ad0452874d267164 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix issue with circular singleton instantiationsv5.10.0-rc2Michael Brasser2017-11-284-0/+36
| | | | | | | | | | | | | | | | | | While a recursion check exists and works, it can lead to instanting the same singleton multiple times (leaking all but one copy). Change-Id: Icf342aad71c5cb225488262341517d95786e1f84 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-248-6/+138
|\| | | | | | | | | | | | | | | | | | | 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-185-0/+102
| | | | | | | | | | | | | | | | | | | | | | 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>
| * Fix outdated BSD license headerKai Koehne2017-10-173-6/+36
| | | | | | | | | | Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* | Fix implicit loading of internal types when using explicit importsSimon Hausmann2017-09-265-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QQC Android style has a type that is intended to be internal only and it's loaded implictly (see bug report for details). However the qml file also has to import the module explicitly in order to get access to the singleton the module provides. The documentation says that types of a module are to be specified in the qmldir file, otherwise they are derived from the file name. With commit 22a2cc43387ec3b9f74a6c01f8665378a4541147 that become an exclusive relationship with regards to types from implicit imports. The proposed solution for the JIRA task is to mark the types that are needed internally as "internal" in the qmldir file and fix support for loading internal types through implicit imports (which is what this commit fixes). Task-number: QTBUG-63309 Change-Id: Id696a691f1af1d335c7c8d72f2627064c3d7b9ac Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-09-205-1/+50
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4compileddata.cpp src/qml/compiler/qv4compileddata_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4qmlcontext_p.h src/qml/jsruntime/qv4regexpobject.cpp src/qml/jsruntime/qv4regexpobject_p.h src/qml/types/qqmllistmodel.cpp src/quick/items/qquickanimatedimage_p.h src/quick/scenegraph/qsgrenderloop.cpp tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
| * Get rid of the root object index variableSimon Hausmann2017-09-081-1/+1
| | | | | | | | | | | | | | | | This is a follow-up to the parent commit to remove the variable that is really a constant (zero). Change-Id: I8fc20027c5c7b871269b814cb8b93636e94be267 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Disable deferring when referenced as a grouped propertyJ-P Nurmi2017-09-065-0/+49
| | | | | | | | | | | | | | | | | | This allows us to fix QTBUG-50992 - the issue with most votes in QQC2. Task-number: QTBUG-63036 Change-Id: I996cd1128582b80e0c8480ae143d682c1e8eb8fe Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Support explicit enum value declaration in QMLMichael Brasser2017-08-1810-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow declarations such as: enum MyEnum { Value1 = 1, Value2 } Not all features of C++ enums are supported. Specifically, we don't yet allow: * Negative numbers (Value1 = -1) * Assignment of other values (Value2 = Value1) Change-Id: I4776f8d86bd0c8688c7dd8b7d4ccb2f72fdfe721 Task-number: QTBUG-14861 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Tests: Clean up inclusion of util.pri and debugutil.priUlf Hermann2017-08-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | When we include debugutil.pri, we always want util.pri, too. We can as well nest the inclusions. Also, setting the include path is much easier from within the .pri files than from outside. Change-Id: I1205bdc3051e16e635d4ea9626f44e51002ddb50 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add support for enum declarations in QMLMichael Brasser2017-07-1312-0/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enums can be declared with the following syntax: enum MyEnum { Value1, Value2 } Grammar changes done by Simon Hausmann. [ChangeLog][QtQml] Enums can now be declared directly in QML. Task-number: QTBUG-14861 Change-Id: Ic6b6e032651d01ee2ecf9d5ce5734976cb3ad7ab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-064-0/+35
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4argumentsobject.cpp src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4errorobject.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/qml/jsruntime/qv4lookup.cpp src/qml/jsruntime/qv4managed.cpp src/qml/jsruntime/qv4managed_p.h src/qml/jsruntime/qv4object.cpp src/qml/jsruntime/qv4object_p.h src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/memory/qv4heap_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/memory/qv4mmdefs_p.h src/quick/scenegraph/util/qsgdistancefieldutil.cpp src/quick/scenegraph/util/qsgdistancefieldutil_p.h tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: I7ed925d4f5d308f872a58ddf51fdce0c8494ec9c
| * Fix concurrent loading of the same qmldir from different scriptsAndy Shaw2017-05-024-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlQmldirData keeps a pointer to a QQmlScript::Import, and an integer priority. Each Blob that is waiting on it was setting its own import and priority even though the QQmlQmldirData itself was shared. This resulted in whichever one began loading last succeeding to load, and the rest failing. This change instead stores the import and priority data per-dependent Blob Fix was originally done by Josh Faust <jfaust@suitabletech.com>. I added the test. Task-number: QTBUG-30469 Change-Id: Id3d15569a999a7c22eeb12b431e5daf1ddae51dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Allow creating attached properties for objects instantiated in C++Frederik Gladhorn2017-05-041-1/+1
| | | | | | | | | | | | Task-number: QTBUG-57396 Change-Id: I31912677ebfdcea9ba97fe0bb66d56bb82b4c90c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | C++11 scoped enum support for QMLMichael Brasser2017-05-037-0/+76
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQml] Support C++11 scoped enums in QML. These can now be accessed as <TypeName>.<EnumName>.<EnumValue> Change-Id: I29bd3f16e980f3e6f1b2390b5a8e9e8e999952a3 Task-number: QTBUG-54961 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qml: Override the new Object::instanceOf hook to allow QML type checkingRobin Burchell2017-03-1510-1/+309
|/ | | | | | | | | | | | | | | [ChangeLog][QtQml] The instanceof keyword in JavaScript has been extended to work on QML types and instances. This means that you are now able to use it to verify that a var is indeed the type you expect (e.g. someVar instanceof Rectangle). Note that one of the added tests revealed a slight shortcoming in the QML type system (QTBUG-58477). For now, we should keep consistency and work to address the problem universally in the future. Change-Id: I7d9bf9b64cfd037908de1ae51b01065eacb95abe Task-number: QTBUG-24799 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add missing qmlRegisterExtendedUncreatableType variantKevin Ottens2017-02-173-0/+117
| | | | | | | | | | | | | We need another qmlRegisterExtendedUncreatableType allowing to pass the metaObjectRevision as third parameter. Otherwise extended uncreatable types can't use for instance REVISION in their properties. This is missing for some of the Qt 3D types for which we are cleaning up the versioning for 5.9.0 and which fall in this category. Change-Id: I20ebec339814d7f43cc4b2b58090406b0d5fb97e Task-Id: QTBUG-58895 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Enable resolution of composite types in QQmlTypeNameCacheRobin Burchell2017-01-277-0/+68
| | | | | | | | | | | | | | | | | | | | | We didn't have resolution of composite types previously, which is a prerequisite to do more exciting things with QML types in JavaScript (such as instanceof). By deferring the resolution to QQmlImports, we can avoid the need to fill the cache with types that may not be needed, while still finding types which are requested. In the future, we could consider removing the "special" handling for composite singletons as they should be found through QQmlImports now. If we do that, we may still want to cache the QUrl for the types, to avoid using QQmlImports too often directly, as it is a little slow itself. This change doesn't regress tst_compilation. Task-number: QTBUG-24799 Change-Id: I9ba2e4829ca49008fd180fb488c586475cf90674 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of FunctionObject::createQmlFunctionLars Knoll2016-12-091-4/+3
| | | | | | | | Instead, simply create a QmlContext, and setup the bindings with the QV4::Function itself. Change-Id: I9db93b15112e43a6d5e275d126fb20f9c8833e8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Change signature of QQmlBinding::create to take a FunctionObject *Lars Knoll2016-12-091-1/+1
| | | | | | | This is what's in the Value in all cases anyway. Change-Id: I212c4c4076050e8d0ea4cf6f72a1683e132cd51b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix support for namespaced types in property/signal declarationsSimon Hausmann2016-11-303-2/+18
| | | | | | | | | | | | | | | | | | | | Declarations such as property Namespace.Item foo or property list<Namespace.Item> foo would get rejected by the grammar due to the lack of productions. This is now encapsulated in the UiPropertyType, which used to be merely an identifier but is now changed to produce a UiQualifiedId - the same type that's also used for MyNamespace.Item { ... } object declarations for example. Task-number: QTBUG-10822 Change-Id: Ic3ac1adbe17c83b24b67950c2f089e267b73b99b Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix support for QML declared default list propertiesSimon Hausmann2016-11-233-0/+20
| | | | | | | | | | | | | | | | | The grammar was not permitting to write default property list<Item> myChildren; and instead developers had to work around it with an alias property list<Item> myChildrenData; default property alias myChildren: myChildrenData which is not nice. Fortunately this is easy to fix in the grammar. Task-number: QTBUG-10822 Change-Id: I4e914ddb9588913da09e9fb6c6aa154cf8a9e18f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add qmlRegisterUncreatableMetaObject convenience functionBogDan Vatra2016-09-073-0/+12
| | | | | | | | | qmlRegisterUncreatableMetaObject is needed to register Q_NAMESPACE QMetaObjects. Task-number: QTBUG-54982 Change-Id: I767dfcb15db647e0dceb0c37b17e64f2a5c1dd8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Make all fields in QQmlPropertyRawData privateErik Verbruggen2016-08-101-1/+1
| | | | | | | | And add accessors. This makes it easier later on to change the storage of the fields. Change-Id: I21163668ac83a7d52f398981baf3c27ef161c177 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix import with qualifier of remote directory with qmldirArnaud Vrac2016-08-101-1/+3
| | | | | | | | | | Do not skip qmldir loading when using an import qualifier and the resolved uri is remote. This makes the import behavior the same in all cases. Task-number: QTBUG-55002 Change-Id: I99d68be02ddd062e387d36946e730df076e80a8d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Use on-disk compilation unit if availableSimon Hausmann2016-08-041-2/+7
| | | | | | | | | | | If we succeeded in saving the compilation unit to disk, then attempt to use it right away. This replaces the C++ heap usage for the compilation unit data as well as the anonymous allocated executable memory with file-backed mmap'ed memory. That means the memory can be discarded when overall availability is low and paged in on-demand. Change-Id: Ide1b1e11752d861eb049a99a26ca12cec5e2502e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-08-023-0/+27
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickshadereffect.cpp 5.7 had a bug-fix in code dev has replaced wholesale. src/quick/items/qquickwindow.cpp src/quick/items/qquickwindow_p.h One side changed a method's signature; the other side renamed a method declared adjacent to it and changed some code using it, moving some from the public class to its private partner. tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp One side added a blank line before a comment the other re-wrote. Kept the re-write, killed the stray blank. .qmake.conf Ignore 5.7's change to MODULE_VERSION. src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmlpropertyvalidator.cpp 5.7 changed code in the former that dev moved to the latter. Reflect 5.7's changes there, adapted to dev's form. src/qml/qml/qqmlobjectcreator.cpp One side added new QVariant types; the other changed how it handled each type of QVariant (without git seeing any conflict); adapted the new stanzas to work the same as the transformed ones. tests/manual/v4/test262 dev had a broken sha1 for it; so used 5.7's 9741ac4655808ac46c127e3d1d8ba3d27ada618e Change-Id: I1fbe2255b97d6ef405cdd1d0cea7fab8dc351d6f
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-013-0/+27
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp tests/auto/quick/qquickitem/tst_qquickitem.cpp Change-Id: If261f8eea84dfa5944bb55de999d1f70aba528fd
| | * Fix string property assignments to 2d vectors and quaternionsSimon Hausmann2016-07-213-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Just like it's possible to assign "1,2,3" to a QVector3D, the same should be possible for a QVector2D and a QQuaternion. Task-number: QTBUG-54858 Change-Id: I8f394279dcdf5c057876efaa316b4bad51a4c126 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Fix alias resolution algorithmSimon Hausmann2016-07-155-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The resolution of aliases needs to to be solved in iterations as an alias can refer to another alias, which may not be created yet in the property cache by the time we try to perform the resolution. Therefore the alias resolution code works off a list of pending aliases after the initial pass of resolution. This also requires the ability to detect circular references. Change-Id: Id4e159b9c713aa8a8a095759e22e3fac456a38a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Added two unit tests for alias nestingSimon Hausmann2016-07-073-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first test covers a use-case currently only otherwise see in QtQuickControls, and so having it here allows for catching regressions in that area before hitting the next qt5 build. Having an alias refer to another alias property within the same file only works if the second alias is resolved/processed before the first one. This works by chance when relying on the order of processing reverse to the declaration, but that's a bug. It should work regardless of the order. That is what the second test-case demonstrates and that is why it is marked as failure. Change-Id: Iba386437d21efa868d9814221092df5f7ef6f1f6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QML: Specialize bindings based on target property type.Erik Verbruggen2016-06-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we can determine the type of a target property during type compilation, we can skip a whole bunch of code that deals with converting the result of a binding to the correct (target) type. This removes 65 instructions on x86 for such typed bindings. Change-Id: Id2c7c57b9ae6dfbeb921121beae9630604ca1d17 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Clean up pragma singleton handling in the type loaderSimon Hausmann2016-06-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Get rid of the m_isSingleton boolean by checking the CompiledData::Unit::flags after the type compilation. This is more compact and makes the singleton type checks independent from the IR. Change-Id: I04189d284e6ea275ac8540918836b641914e7588 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Clean up file/error handling in the type loaderSimon Hausmann2016-06-202-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fold the functionality of reading QFile contents via QQmlFile into QQmlDataBlob::Data. This reduces the dependency on QQmlFile - which is scheduled for removal - and it makes it possible in the future to avoid reading the file altogether if we have a cached compilation unit on disk. Change-Id: Ieeaf52b6fb1d25665cd3c3b196819e25aba3dd15 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Minor const cleanupSimon Hausmann2016-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The unit data of QV4::CompiledData::CompilationUnit is read-only, which we should "enforce" with a const, especially as in the future it may come from a read-only mmap'ed chunk of memory. Change-Id: I58dde9fe2494d3cfa52cdc9f612c7fa90b98aa26 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Remove QQmlCompiledData in favor of QV4::CompiledData::CompilationUnitSimon Hausmann2016-06-013-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Removed the dependency to QQmlCompiledData from QQmlCustomParserSimon Hausmann2016-05-302-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | We only need fields from the compilation unit, so let's pass that instead. This is private, internal QQmlEngine API only used by QtQml and QtQuick. Change-Id: I1a659654d95585b736384b5b519d05a4df3f9ead Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Optimize named object handlingSimon Hausmann2016-05-262-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By storing the object indices of named objects in the CompiledData::Object of a component, we can achieve two things: (1) We can eliminate the hash of vectors in QQmlCompiledData for the object-to-id mapping (2) We can store the mapping from object name to integer object id in the CompilationUnit and share it across different QQmlContextData instances (as long as it is not modified). Also added a new test that verifies the functionality of a .qml file starting with Component{} itself with object names, something that was previously only implicitly tested through some of the examples (corkboards.qml for example). Change-Id: I28c70217222dc0e5252bf5247b7e3fc4def47446 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Get rid of QQmlVMEMetaDataSimon Hausmann2016-05-241-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is unused now and we can remove it as well as its QByteArray based storage. The non-emptyness of the meta-data QByteArray was also used to indicate whether it is necessary to create a VME meta-object when instantiating an object. This bit is now folded into the flag of the QFlagPointer storing the property caches. Change-Id: I3c3604c61ff16a4e76912e68b1c19afdb0f2bd9d Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Get rid of QQmlVMEMetaData::AliasDataSimon Hausmann2016-05-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The remaining signal index for the changed signal of the alias target is something that we need only once (when doing the initial alias endpoint connection) and then we can retrieve it from the property cache. Change-Id: Ifbd4625f9af3ca00c9b916eee5c82f58450d54ef Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Simplify VME meta object meta-dataSimon Hausmann2016-05-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For each type of VME meta object we store an array of integers holding the meta-type ids of the QML declared properties. We can replace that array with access to the QV4::CompiledData::Property entry for each property, where the type is also accessible. This is a fairly straight-forward change, except for the bit in QV4::CompilationUnit where we delay the release of the CompiledData::Unit and friends until the destructor instead of releasing it at unlink time. That should be a safe change and is necessary as there are a few tests around where the VME meta object still needs access to this meta-data at a very late stage in the life-cycle right before the deferred deletion is run. Change-Id: I431de15d12766df837c0e0251192df16a5a76868 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>