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

@@ -209,6 +209,36 @@ void dump(const QMetaObject *meta, QXmlStreamWriter *xml)
xml->writeEndElement();
}
void writeScriptElement(QXmlStreamWriter *xml)
{
xml->writeStartElement("type");
{
QXmlStreamAttributes attributes;
attributes.append(QXmlStreamAttribute("name", "Script"));
xml->writeAttributes(attributes);
}
xml->writeStartElement("property");
{
QXmlStreamAttributes attributes;
attributes.append(QXmlStreamAttribute("name", "script"));
attributes.append(QXmlStreamAttribute("type", "string"));
xml->writeAttributes(attributes);
}
xml->writeEndElement();
xml->writeStartElement("property");
{
QXmlStreamAttributes attributes;
attributes.append(QXmlStreamAttribute("name", "source"));
attributes.append(QXmlStreamAttribute("type", "QUrl"));
xml->writeAttributes(attributes);
}
xml->writeEndElement();
xml->writeEndElement();
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
@@ -252,6 +282,8 @@ int main(int argc, char *argv[])
foreach (const QMetaObject *meta, metas) {
dump(meta, &xml);
}
writeScriptElement(&xml);
xml.writeEndElement();
xml.writeEndDocument();