diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-05-20 05:36:25 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-05-20 05:36:25 (GMT) |
commit | 1aeab18c1e78e201a38d76a24e8cfd2733e4f5e7 (patch) | |
tree | 39ad1c03ddd858ddf18463ae61cb1aca2f7cd7fb /tools/qmlviewer/main.cpp | |
parent | 47f2559f10780f81a1fd1387b2eebeb804fe9378 (diff) | |
download | Qt-1aeab18c1e78e201a38d76a24e8cfd2733e4f5e7.zip Qt-1aeab18c1e78e201a38d76a24e8cfd2733e4f5e7.tar.gz Qt-1aeab18c1e78e201a38d76a24e8cfd2733e4f5e7.tar.bz2 |
Basic qualified type support.
Can now:
DialLibrary.Dial { ... }
without any import statement.
Can also run qmlviewer with -L DialLibrary then use Dial { ... }.
The exact way this works will almost definitely change to ensure predictable
behaviour under future type additions to scopes.
Diffstat (limited to 'tools/qmlviewer/main.cpp')
-rw-r--r-- | tools/qmlviewer/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp index f59918f..38a00bb 100644 --- a/tools/qmlviewer/main.cpp +++ b/tools/qmlviewer/main.cpp @@ -41,6 +41,7 @@ void usage() qWarning(" -recordtest <directory> .................. record an autotest"); qWarning(" -runtest <directory> ..................... run a previously recorded test"); qWarning(" -translation <translationfile> ........... set the language to run in"); + qWarning(" -L <directory> ........................... prepend to the library search path"); qWarning(" "); qWarning(" Press F1 for interactive help"); exit(1); @@ -81,6 +82,7 @@ int main(int argc, char ** argv) QString dither = "none"; QString recordfile; QStringList recordargs; + QStringList libraries; QString skin; bool devkeys = false; bool cache = false; @@ -132,6 +134,8 @@ int main(int argc, char ** argv) usage(); translationFile = newargv[i + 1]; ++i; + } else if (arg == "-L") { + libraries << QString(argv[++i]); } else if (arg[0] != '-') { fileName = arg; } else if (1 || arg == "-help") { @@ -146,6 +150,8 @@ int main(int argc, char ** argv) } QmlViewer viewer(testMode, testDir, 0, frameless ? Qt::FramelessWindowHint : Qt::Widget); + foreach (QString lib, libraries) + viewer.addLibraryPath(lib); viewer.setCacheEnabled(cache); viewer.setRecordFile(recordfile); if (period>0) |