Fix completion and checking for Script elements. Update Qml type xml.

* The "Script" type is now implicitly available without imports.
* No errors for bindings inside a Connections element.

Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-03-03 11:36:42 +01:00
parent 93dbb3a5fc
commit 08b9323f0c
5 changed files with 1493 additions and 1339 deletions

View File

@@ -150,6 +150,11 @@ void Link::populateImportedTypes(Interpreter::ObjectValue *typeEnv, Document::Pt
if (! (doc->qmlProgram() && doc->qmlProgram()->imports))
return;
// Add the implicitly available Script type
const ObjectValue *scriptValue = engine()->metaTypeSystem().staticTypeForImport("Script");
if (scriptValue)
typeEnv->setProperty("Script", scriptValue);
QFileInfo fileInfo(doc->fileName());
const QString absolutePath = fileInfo.absolutePath();