summaryrefslogtreecommitdiff
path: root/src/tools/qml
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2010-03-03 11:36:42 +0100
committerChristian Kamm <christian.d.kamm@nokia.com>2010-03-03 11:38:17 +0100
commit08b9323f0c9358df4f9f535d7ec5781cece11134 (patch)
treefa3745a9cd3342d204b6181d29309bfa09e65121 /src/tools/qml
parent93dbb3a5fcfb18e4f878d57a480b0238f551ea92 (diff)
downloadqt-creator-08b9323f0c9358df4f9f535d7ec5781cece11134.tar.gz
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
Diffstat (limited to 'src/tools/qml')
-rw-r--r--src/tools/qml/qmldump/main.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/tools/qml/qmldump/main.cpp b/src/tools/qml/qmldump/main.cpp
index e8891d60ee..de026a3c29 100644
--- a/src/tools/qml/qmldump/main.cpp
+++ b/src/tools/qml/qmldump/main.cpp
@@ -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();