summaryrefslogtreecommitdiffstats
path: root/tools/qmlplugindump
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2011-06-29 12:00:34 (GMT)
committerChristian Kamm <christian.d.kamm@nokia.com>2011-06-29 12:00:34 (GMT)
commitd7ab0007d4b051f3cf12f01157b8b78d2fddf7c8 (patch)
tree11772693988425e5afc48b89af960b736484a203 /tools/qmlplugindump
parenta39e975465a5dc0548891ccd93c4ff04165b60cd (diff)
downloadQt-d7ab0007d4b051f3cf12f01157b8b78d2fddf7c8.zip
Qt-d7ab0007d4b051f3cf12f01157b8b78d2fddf7c8.tar.gz
Qt-d7ab0007d4b051f3cf12f01157b8b78d2fddf7c8.tar.bz2
qmlplugindump: Fix dumping with -path on Mac.
If the current working directory was a direct parent of the qmldir path the exported modules had the path as the module URI on macs. Also changes the QtQuick export back to 1.0 to make it work with Qt 4.7.3. The version of that import statement does not actually matter as long as it's valid. Mirrors a change in Qt Creator: http://codereview.qt.nokia.com/896 Reviewed-by: Kai Koehne
Diffstat (limited to 'tools/qmlplugindump')
-rw-r--r--tools/qmlplugindump/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp
index af291ee..ae06d02 100644
--- a/tools/qmlplugindump/main.cpp
+++ b/tools/qmlplugindump/main.cpp
@@ -272,6 +272,9 @@ public:
if (qmlTyName.startsWith(relocatableModuleUri + QLatin1Char('/'))) {
qmlTyName.remove(0, relocatableModuleUri.size() + 1);
}
+ if (qmlTyName.startsWith("./")) {
+ qmlTyName.remove(0, 2);
+ }
exports += enquote(QString("%1 %2.%3").arg(
qmlTyName,
QString::number(qmlTy->majorVersion()),
@@ -536,11 +539,16 @@ int main(int argc, char *argv[])
QDeclarativeView view;
QDeclarativeEngine *engine = view.engine();
- if (!pluginImportPath.isEmpty())
+ if (!pluginImportPath.isEmpty()) {
+ QDir cur = QDir::current();
+ cur.cd(pluginImportPath);
+ pluginImportPath = cur.absolutePath();
+ QDir::setCurrent(pluginImportPath);
engine->addImportPath(pluginImportPath);
+ }
// find all QMetaObjects reachable from the builtin module
- QByteArray importCode("import QtQuick 1.1\n");
+ QByteArray importCode("import QtQuick 1.0\n");
QSet<const QMetaObject *> defaultReachable = collectReachableMetaObjects(importCode, engine);
// this will hold the meta objects we want to dump information of