- 
    Task 
- 
    Resolution: Done
- 
    P3: Somewhat important 
- 
    None
- 
        60ca8dae85 (qt/qtdeclarative/dev) 60ca8dae85 (qt/tqtc-qtdeclarative/dev)
Whenever one creates a list<X> property in QML and then assigns something to it via a binding (relevant for QObject * list properties and their assignments), qmltc generates code that creates QQmlListReference and then uses its interface to append elements to the list property.
This is rather slow* and in reality we could directly use QQmlListProperty<X> API instead (the assumption is that any "list" property in QML is a QQmlListProperty**).
Rough code generation:
import QtQuick Item { // item has a default property "data" which is a QQmlListProperty Text {} // default property assignment here would append to "data" } // rough code generated to assign a Text object: // old: QQmlListReference data(item, "data"); // item is a QQuickItem * data.append(text); // text is a QQuickText * // new: QQmlListProperty<QObject> data = item->data(); // call QQuickItem::data() directly data.append(&data, text);
* QQmlListReference looks up a property in a QObject by name and then does extra boilerplate that we don't need in qmltc.
** except list of value types in which case assume it is a QList but this is out of scope here
- blocks
- 
                    QTBUG-105946 qmltc: inline components -         
- Closed
 
-         
- is required for
- 
                     QTBUG-96269
        (qmltc) Improve performance of the generated code QTBUG-96269
        (qmltc) Improve performance of the generated code-         
- Open
 
-         
- relates to
- 
                     QTBUG-105538
        qmltc evolution collection task QTBUG-105538
        qmltc evolution collection task-         
- Open
 
-         
