forked from qt-creator/qt-creator
Generate tags for the builtin QML extensions.
This commit is contained in:
@@ -211,7 +211,7 @@ void dump(const QMetaObject *meta, QXmlStreamWriter *xml)
|
||||
|
||||
void writeScriptElement(QXmlStreamWriter *xml)
|
||||
{
|
||||
xml->writeStartElement("type");
|
||||
xml->writeStartElement("type");
|
||||
{
|
||||
QXmlStreamAttributes attributes;
|
||||
attributes.append(QXmlStreamAttribute("name", "Script"));
|
||||
@@ -246,6 +246,19 @@ int main(int argc, char *argv[])
|
||||
QDeclarativeView view;
|
||||
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");
|
||||
|
||||
QSet<const QMetaObject *> metas;
|
||||
@@ -264,6 +277,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
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 += tyName;
|
||||
code += " {}\n";
|
||||
|
||||
@@ -286,7 +303,7 @@ int main(int argc, char *argv[])
|
||||
foreach (const QMetaObject *meta, nameToMeta) {
|
||||
dump(meta, &xml);
|
||||
}
|
||||
|
||||
|
||||
writeScriptElement(&xml);
|
||||
|
||||
xml.writeEndElement();
|
||||
|
||||
Reference in New Issue
Block a user