summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-08-26 10:47:13 +0200
committerQt by Nokia <qt-info@nokia.com>2011-08-29 08:26:23 +0200
commit438639f9c40311b51a57b501428d2650f21615cf (patch)
treebc94e35f040be1c7bb825bab0134fcb11f626354 /tools
parentb016460dc49c0ea5a1ed54c71f47ba52819921a8 (diff)
qmlplugindump: Load QtQuick 1 plugin.
This allows the QtQuick1 types to be dumped with --builtin and to be skipped when dumping other plugins that use them. Change-Id: I23ecba5cea7c11e998861746f1c7056e8911abf3 Reviewed-on: http://codereview.qt.nokia.com/3650 Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlplugindump/main.cpp13
-rw-r--r--tools/qmlplugindump/qmlplugindump.pro2
2 files changed, 14 insertions, 1 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index 46d31739ee..1fdfb2e83d 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -540,6 +540,19 @@ int main(int argc, char *argv[])
engine.addImportPath(pluginImportPath);
}
+ // load the QtQuick 1 plugin
+ {
+ QByteArray code("import QtQuick 1.0\nQtObject {}");
+ QDeclarativeComponent c(&engine);
+ c.setData(code, QUrl::fromLocalFile(pluginImportPath + "/loadqtquick1.qml"));
+ c.create();
+ if (!c.errors().isEmpty()) {
+ foreach (const QDeclarativeError &error, c.errors())
+ qWarning() << error.toString();
+ return EXIT_IMPORTERROR;
+ }
+ }
+
// find all QMetaObjects reachable from the builtin module
QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects();
QList<QDeclarativeType *> defaultTypes = QDeclarativeMetaType::qmlTypes();
diff --git a/tools/qmlplugindump/qmlplugindump.pro b/tools/qmlplugindump/qmlplugindump.pro
index 0ac3a70c14..49134a05ab 100644
--- a/tools/qmlplugindump/qmlplugindump.pro
+++ b/tools/qmlplugindump/qmlplugindump.pro
@@ -2,7 +2,7 @@ TEMPLATE = app
CONFIG += qt uic console
DESTDIR = $$QT.declarative.bins
-QT += declarative declarative-private core-private
+QT += declarative declarative-private qtquick1 core-private
TARGET = qmlplugindump