summaryrefslogtreecommitdiff
path: root/src/qml/compiler/qqmlpropertycachecreator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move QQmlPropertyCacheCreator implementation into the header fileSimon Hausmann2016-06-161-413/+0
| | | | | | | | | When the class becomes a template, it will have to live there anyway. By moving it separately now the diff of the template conversion becomes much easier to read. Change-Id: I0fbda26d908c928d96262bc55da20a36391a8092 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Separate non-generic code out of QQmlPropertyCacheCreatorSimon Hausmann2016-06-161-17/+17
| | | | | | | | | | Some code is not suitable for a future conversion of the class to a template, which is now moved out. This includes the tr() handling as well as the instantiation context, which does not require any parameterization. Change-Id: Ib40e24ebb7166c8649ca218f02558a737d39fe53 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove base-class dependency of QQmlPropertyCacheCreatorSimon Hausmann2016-06-161-10/+9
| | | | | | | | By not depending on QQmlCompilePass the code will be re-usable also outside of the type compiler in the future. Change-Id: I55c637886cf557d6d130c4f9325d6b0790cb2806 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Minor QQmlPropertyCacheCreator API cleanupSimon Hausmann2016-06-161-19/+10
| | | | | | | | | | | | As part of removing the QQmlTypeCompiler dependency, the property cache vector output of the creator is now passed explicitly as an out parameter to the constructor. Similarly the error handling is made explicit in the API instead of implicitly passing any generated errors to the QQmlTypeCompiler. Change-Id: Ia3013011518f59f57f2eecb526f64dec7d82cb91 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* PropertyCacheCreator traversal cleanupSimon Hausmann2016-06-161-24/+18
| | | | | | | | | Replace the direct linked list object traversal with iterators. This will allow for re-use of the code against the QV4::CompiledData structures when they get the same interface. Change-Id: I901fd3377ef0f0317e5d9278cface37d80f93abf Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up property cache array handlingSimon Hausmann2016-06-161-22/+11
| | | | | | | | | | | | | The QQmlPropertyCacheVector in the CompilationUnit encapsulates the property caches for the objects declared in the QML tree as well as the bits indicating whether a VME meta-object is needed. The ref-counting for the caches in that vector was done "manually" and thus error prone. This patch replaces the vector with a wrapper container that has explicit move semantics and takes care of the addref() and release() calls upon insertion, replacement and destruction. Change-Id: If805fe016f1a1c70e56f8a90909ab87b653ea026 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up property cache creation codeSimon Hausmann2016-06-161-95/+111
| | | | | | | | | | | | | | | | | | * Reduce the complexity of the recursive tree traversal by moving the base type property cache creation into a helper function and using a context to encapsulate the origin of the current traversal * ensureVMEMetaObject() had only one call site and it's easiest to inline that for now. * Transition to a new state-less error handling, so that in the future this code can be used without the QQmlTypeCompiler dependency, which will be needed for loading of compilation units from disk. * A few missing consts. Change-Id: Ibe7209c357a3c7e101fac6960ece40a033e55f72 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* File naming cleanupSimon Hausmann2016-06-151-0/+495
Separate out the property cache creation code into a standalone file. Change-Id: Ib67bb1ef72c3de70ebd1ca8cae41947cbad7bfe3 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>