Commit d1cb9fed authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Generate tags for the builtin QML extensions.

parent 204bf0bd
...@@ -211,7 +211,7 @@ void dump(const QMetaObject *meta, QXmlStreamWriter *xml) ...@@ -211,7 +211,7 @@ void dump(const QMetaObject *meta, QXmlStreamWriter *xml)
void writeScriptElement(QXmlStreamWriter *xml) void writeScriptElement(QXmlStreamWriter *xml)
{ {
xml->writeStartElement("type"); xml->writeStartElement("type");
{ {
QXmlStreamAttributes attributes; QXmlStreamAttributes attributes;
attributes.append(QXmlStreamAttribute("name", "Script")); attributes.append(QXmlStreamAttribute("name", "Script"));
...@@ -246,6 +246,19 @@ int main(int argc, char *argv[]) ...@@ -246,6 +246,19 @@ int main(int argc, char *argv[])
QDeclarativeView view; QDeclarativeView view;
QDeclarativeEngine *engine = view.engine(); QDeclarativeEngine *engine = view.engine();
{
QByteArray code;
code += "import Qt 4.6;\n";
code += "import Qt.widgets 4.6;\n";
code += "import Qt.multimedia 1.0;\n";
code += "import Qt.labs.particles 4.6;\n";
code += "import org.webkit 1.0;\n";
code += "Item {}";
QDeclarativeComponent c(engine);
c.setData(code, QUrl("xxx"));
c.create();
}
cppToQml.insert("QString", "string"); cppToQml.insert("QString", "string");
QSet<const QMetaObject *> metas; QSet<const QMetaObject *> metas;
...@@ -264,6 +277,10 @@ int main(int argc, char *argv[]) ...@@ -264,6 +277,10 @@ int main(int argc, char *argv[])
QByteArray code; QByteArray code;
code += "import Qt 4.6;\n"; code += "import Qt 4.6;\n";
code += "import Qt.widgets 4.6;\n";
code += "import Qt.multimedia 1.0;\n";
code += "import Qt.labs.particles 4.6;\n";
code += "import org.webkit 1.0;\n";
code += tyName; code += tyName;
code += " {}\n"; code += " {}\n";
...@@ -286,7 +303,7 @@ int main(int argc, char *argv[]) ...@@ -286,7 +303,7 @@ int main(int argc, char *argv[])
foreach (const QMetaObject *meta, nameToMeta) { foreach (const QMetaObject *meta, nameToMeta) {
dump(meta, &xml); dump(meta, &xml);
} }
writeScriptElement(&xml); writeScriptElement(&xml);
xml.writeEndElement(); xml.writeEndElement();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment