summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-03-29 22:43:05 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-03-29 22:43:05 (GMT)
commit176390773658ce396b1776e2872ecb389a2351a3 (patch)
tree3649ec2b2a5cbad94777bfb52155e8974e55417d /tools
parent5a6747ad0418862cafde45837c02a87bfb6b3db3 (diff)
downloadQt-176390773658ce396b1776e2872ecb389a2351a3.zip
Qt-176390773658ce396b1776e2872ecb389a2351a3.tar.gz
Qt-176390773658ce396b1776e2872ecb389a2351a3.tar.bz2
Simplify import path.
Reviewed-by: mae
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/main.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index a4de339..8062e8e 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -41,6 +41,7 @@
#include "qdeclarative.h"
#include "qmlruntime.h"
+#include "qdeclarativeengine.h"
#include <QWidget>
#include <QDir>
#include <QApplication>
@@ -100,7 +101,8 @@ void usage()
qWarning(" -dragthreshold <size> .................... set mouse drag threshold size");
qWarning(" -netcache <size> ......................... set disk cache to size bytes");
qWarning(" -translation <translationfile> ........... set the language to run in");
- qWarning(" -L <directory> ........................... prepend to the library search path");
+ qWarning(" -L <directory> ........................... prepend to the library search path,");
+ qWarning(" display path if <directory> is empty");
qWarning(" -opengl .................................. use a QGLWidget for the viewport");
qWarning(" -script <path> ........................... set the script to use");
qWarning(" -scriptopts <options>|help ............... set the script options to use");
@@ -238,7 +240,12 @@ int main(int argc, char ** argv)
} else if (arg == "-qmlbrowser") {
useNativeFileBrowser = false;
} else if (arg == "-L") {
- if (lastArg) usage();
+ if (lastArg) {
+ QDeclarativeEngine tmpEngine;
+ QString paths = tmpEngine.importPathList().join(QLatin1String(":"));
+ fprintf(stderr, "Current search path: %s\n", paths.toLocal8Bit().constData());
+ return 0;
+ }
libraries << QString(argv[++i]);
} else if (arg == "-script") {
if (lastArg) usage();