diff options
author | Martin Jones <martin.jones@nokia.com> | 2011-07-11 13:47:51 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-12 06:38:09 +0200 |
commit | 4442dea01b9d4d45964228ac442166d89f091f9e (patch) | |
tree | 28ae20cb26967765a988b1ee522fc2d64d777671 /tools/qmlplugindump | |
parent | b119220da60453ecf31898f7a57eda9d3c4e9225 (diff) |
Extract all QtQuick 1 elements into a separate library/plugin.
Change-Id: I41a280de2739ee08202f4be2519e5012870090f2
Reviewed-on: http://codereview.qt.nokia.com/1391
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'tools/qmlplugindump')
-rw-r--r-- | tools/qmlplugindump/main.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index b78a68a691..ea82bc1b2e 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -42,7 +42,6 @@ #include <QtDeclarative/QtDeclarative> #include <QtDeclarative/private/qdeclarativemetatype_p.h> #include <QtDeclarative/private/qdeclarativeopenmetaobject_p.h> -#include <QtDeclarative/QDeclarativeView> #include <QtGui/QApplication> @@ -537,19 +536,18 @@ int main(int argc, char *argv[]) } } - QDeclarativeView view; - QDeclarativeEngine *engine = view.engine(); + QDeclarativeEngine engine; if (!pluginImportPath.isEmpty()) { QDir cur = QDir::current(); cur.cd(pluginImportPath); pluginImportPath = cur.absolutePath(); QDir::setCurrent(pluginImportPath); - engine->addImportPath(pluginImportPath); + engine.addImportPath(pluginImportPath); } // find all QMetaObjects reachable from the builtin module QByteArray importCode("import QtQuick 2.0\n"); - QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(importCode, engine); + QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(importCode, &engine); // this will hold the meta objects we want to dump information of QSet<const QMetaObject *> metas; @@ -570,7 +568,7 @@ int main(int argc, char *argv[]) { QByteArray code = importCode; code += "QtObject {}"; - QDeclarativeComponent c(engine); + QDeclarativeComponent c(&engine); c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/typelist.qml")); c.create(); @@ -581,7 +579,7 @@ int main(int argc, char *argv[]) } } - QSet<const QMetaObject *> candidates = collectReachableMetaObjects(importCode, engine); + QSet<const QMetaObject *> candidates = collectReachableMetaObjects(importCode, &engine); candidates.subtract(defaultReachable); // Also eliminate meta objects with the same classname. |