aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlobjectcreator_p.h
Commit message (Collapse)AuthorAgeFilesLines
...
* [new compiler] Implement setting object propertiesSimon Hausmann2013-09-201-1/+1
| | | | | | | | | This includes assigning to interface properties, variants that hold QObject pointers and regular QObject <> QObject assignments (assuming that they are compatible) Change-Id: Icd82c672e6899c6bfeb7f0ec758a81f8b70275ab Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix timing of binding enablingSimon Hausmann2013-09-201-1/+4
| | | | | | | Enabling bindings right before emitting Component.onComplete Change-Id: I4cc330f5e59b326368c617f16a7d4fd51b6c50db Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Implement remaining literal binding value assignmentsSimon Hausmann2013-09-201-2/+2
| | | | | | | | | Ported over the code from genLiteralAssignment and testLiteralAssignment to converting the AST type (string, bool, number) to the expected property meta-type. Change-Id: I709b97efdd741dbc4217ee0b9712de58dd32b82d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Add support for finalization callbacksSimon Hausmann2013-09-201-0/+5
| | | | | | | | | | | This is needed for Component.onCompleted (the signal emission) as well as the private finalization callback API in QQmlEngine, used by QtQuick. The creator - similar to the VME - tracks the attached properties object of QQmlComponent through a linked list. Change-Id: I8ada94009a7ce2078feefd359485657626c300fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Fix function and binding expression setupSimon Hausmann2013-09-201-2/+2
| | | | | | | | | | | | | | | | | | Binding expressions and QML used to be set up so that they were written as function closure: (function(...) { expression here }) and then evaluated inside qml scope. With the new setup we do that closure setup manually now. For that we have to define a dummy outter "context scope" function in the codegen, that will later be used to look up the context ids. Change-Id: I0656419d67a1728451fcd46f402b03979f118b0b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup: Fold CompiledData::Value into CompiledData::BindingSimon Hausmann2013-09-201-4/+0
| | | | | | | Value isn't needed anywhere else Change-Id: Ib12d85332a6096e6232a790a7e6fd63961329e3b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Add support for id propertiesSimon Hausmann2013-09-201-1/+3
| | | | | Change-Id: Idb4a0ad06f6cbe5d040da075a8f43d067a27ebc4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Initial support for group propertiesSimon Hausmann2013-09-201-0/+2
| | | | | | | | | | | | | | | | | | | This implements support for "font.pixelSize: 24" for example. The representation in the compile data structure is so that font.pixelSize is short-hand for font { pixelSize: 24 } which means that inside the braces is a complete object initializer. For that initializer we create a dedicated CompiledData::Object, which however has its type name empty. When populating the outer instance then, the "font" property is read as QQmlValueType (a QObject) and instead of creating a new QObject we use that value type as instance to run the rest of the QML object initializer (everything in braces). Change-Id: Ic0a37ac77ab88f582546b9c09a3d06a07726420b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Implement proper type resolutionSimon Hausmann2013-09-131-4/+6
| | | | | | | | | Collect all references to unknown types after parsing, re-use the existing code in QQmlTypeLoader to resolve them and finally use the resolved references map in the QQmlObjectCreator instead of the type name cache directly. Change-Id: I8b83af4f8852e79c33985457081c024358bb9622 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* [new compiler] Implement name sanity checking for properties, signals and ↵Simon Hausmann2013-09-121-1/+1
| | | | | | | functions Change-Id: I58c442dc56075c449ebd2534ab6b9f90e7da8eae Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix error reporting timingSimon Hausmann2013-09-121-20/+31
| | | | | | | | | | | | | Errors for example in signal declarations are usually reported in the loader thread, during property cache construction. This patch separates out the property cache population into QQmlPropertyCacheCreator, runs it from the loader thread and reduces the QQmlObjectCreator to merely set the properties/bindings/ functions on the object. This also enables location tracking for signal declarations and their error reporting. Change-Id: Ief1ffbb3113f8279a50d1a12dab8dbe096702a60 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix -Werror buildSimon Hausmann2013-09-111-1/+1
| | | | | Change-Id: Ib184ad5e0c99050df227e2c8413b466fccb69236 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix error reporting for wrong signal parameter declarationsSimon Hausmann2013-09-081-2/+8
| | | | | | | | Record the line/column in the signal and report it together with the url if there was an error in declaring the signals. Change-Id: Idbbee9be271b0ca55709ffc1791637595d7ebd89 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix error reporting in the new object creatorSimon Hausmann2013-09-081-2/+5
| | | | | | | | | | Propagate error conditions from createVMEMetaObjectAndPropertyCache to the caller and properly clean up refcounts (using QQmlRefPointer) Also fixed qmlscene to report errors if create() failed. Change-Id: I75d984798a197c102078e5d5638ed92f167ab49f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Beginning of a new qml parserSimon Hausmann2013-09-081-0/+97
The goal is to parse QML and JavaScript binding expressions/functions in one go and generate data structures that allow for the parsing to happen in a thread and the instantiation of the object tree in another thread, just reading from the generated data structures. This will replace qqmlcompiler and the VME. This new way of loading QML is currently hidden behind the QML_NEW_COMPILER=1 environment variable. There's lots of work left to fill in the gaps in object construction, Component support, Component.onComplete, error messages, etc. etc. Change-Id: I5e40643cff169f469f0b6ce151584ffee5ca5e90 Reviewed-by: Lars Knoll <lars.knoll@digia.com>