From 52e07d564b65ed6ce26955a676c7692ad67686c1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 25 Apr 2014 16:19:02 +0200 Subject: Rework custom parser integration The custom parser design used to be so that the custom parser operates on the "AST", creates its own binary representation of the data it needs, stores it in a QByteArray and gets that at object instantiation time. That meant serializing everything necessary. With the introduction of the "binary" QML data structure, that process of serialization becomes obsolete and would require extra work in the custom parsers for example for QQuickStates to store the translation parameters. The clean solution is to eliminate this unnecessary serialization process and instead let the custom parsers do a verification pass at type compile time and then simply operate directly on the QV4::CompiledData::Bindings at object instantiation time. That simplifies the code, and allows for support of translations throughout all list model properties. Additionally this speeds up the creation of state objects and reduces memory consumption. Previously a text: qsTr("foo") binding in states would result in an actual java script binding. After this patch it is merely stored as a string and translated at object instantiation time. Change-Id: I7550274513f54abb09a0ab4de51c4c0bcdb23cae Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4script_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/jsruntime/qv4script_p.h') diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h index de582f9674..b2c0efc75f 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -55,7 +55,7 @@ namespace QV4 { struct ExecutionContext; -struct QmlBindingWrapper : FunctionObject { +struct Q_QML_EXPORT QmlBindingWrapper : FunctionObject { V4_OBJECT QmlBindingWrapper(ExecutionContext *scope, Function *f, ObjectRef qml); -- cgit v1.2.3