summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp2
-rw-r--r--src/declarative/qml/qmlscriptparser.cpp21
2 files changed, 21 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp
index dd42581..e1a88bb 100644
--- a/src/declarative/qml/qmlcompiler.cpp
+++ b/src/declarative/qml/qmlcompiler.cpp
@@ -747,8 +747,6 @@ bool QmlCompiler::compileSignal(Property *prop, Object *obj)
if(isBinding(script))
COMPILE_EXCEPTION("Cannot assign binding to signal property");
- qDebug() << "and here we go...";
-
int idx = output->indexForString(script);
int pr = output->indexForByteArray(prop->name);
diff --git a/src/declarative/qml/qmlscriptparser.cpp b/src/declarative/qml/qmlscriptparser.cpp
index ddd473a..a141fa4 100644
--- a/src/declarative/qml/qmlscriptparser.cpp
+++ b/src/declarative/qml/qmlscriptparser.cpp
@@ -77,6 +77,7 @@ protected:
virtual bool visit(AST::UiScriptBinding *node);
virtual bool visit(AST::UiArrayBinding *node);
+ virtual bool visit(AST::UiSourceElement *node);
void accept(AST::Node *node);
@@ -423,6 +424,26 @@ bool ProcessAST::visit(AST::UiArrayBinding *node)
return false;
}
+bool ProcessAST::visit(AST::UiSourceElement *node)
+{
+ QString source;
+ QTextStream out(&source);
+ PrettyPretty pp(out);
+
+ pp(node->sourceElement);
+
+ Object *obj = defineObjectBinding(-1, // ### line
+ 0,
+ QLatin1String("Script"));
+
+ Value *value = new Value;
+ value->primitive = source;
+ value->line = -1; // ### fix me
+ obj->getDefaultProperty()->addValue(value);
+
+ return false;
+}
+
} // end of anonymous namespace