From 77e1ef8cb41f790115ff7552717e0ba4d33c3cf0 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 14 May 2010 13:18:33 +0200 Subject: Rename QML Runtime (executable) to QML Launcher The qml executable was first referred to as QML Viewer, then QML Runtime ... however, the latter one caused much confusion (see old version of qmlruntime.qdoc). Doc changes reviewed by Leena Miettinen. --- .gitignore | 1 - doc/src/declarative/qmlruntime.qdoc | 47 +++++++++++----------- doc/src/snippets/declarative/gridview/gridview.qml | 2 +- .../snippets/declarative/listview/highlight.qml | 2 +- doc/src/snippets/declarative/listview/listview.qml | 2 +- examples/declarative/listview/highlight.qml | 2 +- src/declarative/QmlChanges.txt | 5 +++ tools/qdoc3/test/macros.qdocconf | 1 + tools/qml/content/Browser.qml | 6 +-- tools/qml/main.cpp | 14 +++---- tools/qml/qml.pro | 2 +- tools/qml/qmlruntime.cpp | 12 +++--- 12 files changed, 50 insertions(+), 46 deletions(-) diff --git a/.gitignore b/.gitignore index ad8e3ea..5707371 100644 --- a/.gitignore +++ b/.gitignore @@ -52,7 +52,6 @@ bin/Qt*.dll bin/assistant* bin/designer* bin/dumpcpp* -bin/duiviewer* bin/idc* bin/linguist* bin/lrelease* diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc index 10aeac0..b105df4 100644 --- a/doc/src/declarative/qmlruntime.qdoc +++ b/doc/src/declarative/qmlruntime.qdoc @@ -46,15 +46,14 @@ \ingroup qttools This page documents the \e{Declarative UI Runtime} for the Qt GUI - toolkit, and the \c qml executable which can be used to run apps - written for the runtime. The \c qml executable reads a declarative user interface definition - (\c .qml) file and displays the user interface it describes. + toolkit, and the \QQL which can be used to run apps + written for the runtime. The \QQL reads a declarative + user interface definition (\c .qml) file and displays the user interface it describes. - QML is a runtime, as you can run plain qml files which pull in their required modules. + QML is a runtime, as you can run plain QML files which pull in their required modules. To run apps with the QML runtime, you can either start the runtime - from your own application (using a QDeclarativeView) or with the simple \c qml application. - The \c qml application can be - installed in a production environment, assuming that it is not already + from your own application (using a QDeclarativeView) or with the simple \QQL. + The launcher can be installed in a production environment, assuming that it is not already present in the system. It is generally packaged alongside Qt. To deploy an application using the QML runtime, you have two options: @@ -62,18 +61,18 @@ \list \o Write your own Qt application including a QDeclarative view and deploy it the same as any other Qt application (not discussed further on this page), or - \o Write a main QML file for your application, and run your application using the included \c qml tool. + \o Write a main QML file for your application, and run your application using the included \QQL. \endlist - To run an application with the \c qml tool, pass the filename as an argument: + To run an application with the \QQL, pass the filename as an argument: \code qml myQmlFile.qml \endcode - Deploying a QML application via the \c qml executable allows for QML only deployments, but can also + Deploying a QML application via the \QQL allows for QML only deployments, but can also include custom C++ modules just as easily. Below is an example of how you might structure - a complex application deployed via the qml runtime, it is a listing of the files that would + a complex application deployed via the QML runtime, it is a listing of the files that would be included in the deployment package. \code @@ -94,7 +93,7 @@ modules must contain a QDeclarativeExtentionPlugin subclass. The application would be executed either with your own application, the command 'qml MyApp.qml' or by - opening the qml file if your system has the \c qml executable registered as the handler for qml files. The MyApp.qml file would have access + opening the file if your system has the \QQL registered as the handler for QML files. The MyApp.qml file would have access to all of the deployed types using the import statements such as the following: \code @@ -102,19 +101,19 @@ import "OtherModule" 1.0 as Other \endcode - \section1 \c qml application functionality - The \c qml application implements some additional functionality to help it serve the role of a launcher - for myriad applications. If you implement your own launcher application, you may also wish to reimplement + \section1 Qt QML Launcher functionality + The \QQL implements some additional functionality to help it supporting + myriad applications. If you implement your own application, you may also wish to reimplement some or all of this functionality. However, much of this functionality is intended to aid the prototyping of - qml applications and may not be necessary for a deployed application. + QML applications and may not be necessary for a deployed application. \section2 Options - When run with the \c -help option, qml shows available options. + When run with the \c -help option, \c qml shows available options. \section2 Translations - When the runtime loads an initial QML file, it will install a translation file from + When the launcher loads an initial QML file, it will install a translation file from a "i18n" subdirectory relative to that initial QML file. The actual translation file loaded will be according to the system locale and have the form "qml_.qm", where is a two-letter ISO 639 language, @@ -126,12 +125,12 @@ See the \l{scripting.html#internationalization}{Qt Internationalization} documentation for information about how to make the JavaScript in QML files use translatable strings. - Additionally, the QML runtime will load translation files specified on the + Additionally, the launcher will load translation files specified on the command line via the \c -translation option. \section2 Dummy Data - The secondary use of the qml runtime is to allow QML files to be viewed with + The secondary use of the launcher is to allow QML files to be viewed with dummy data. This is useful when prototyping the UI, as the dummy data can be later replaced with actual data and bindings from a C++ plugin. To provide dummy data: create a directory called "dummydata" in the same directory as @@ -153,13 +152,13 @@ \section2 Runtime Object - All applications using the qmlruntime will have access to the 'runtime' + All applications using the launcher will have access to the 'runtime' property on the root context. This property contains several pieces of information about the runtime environment of the application. \section3 Screen Orientation - A special piece of dummy data which is integrated into the runtime is + A special piece of dummy data which is integrated into the launcher is a simple orientation property. The orientation can be set via the settings menu in the application, or by pressing Ctrl+T to toggle it. @@ -173,13 +172,13 @@ } \endcode - This allows your application to respond to the orientation of the screen changing. The runtime + This allows your application to respond to the orientation of the screen changing. The launcher will automatically update this on some platforms (currently the N900 only) to match the physical screen's orientation. On other plaforms orientation changes will only happen when explictly asked for. \section3 Window Active - The runtime.isActiveWindow property tells whether the main window of the qml runtime is currently active + The runtime.isActiveWindow property tells whether the main window of the launcher is currently active or not. This is especially useful for embedded devices when you want to pause parts of your application, including animations, when your application loses focus or goes to the background. diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml index 1d3df97..cf345aa 100644 --- a/doc/src/snippets/declarative/gridview/gridview.qml +++ b/doc/src/snippets/declarative/gridview/gridview.qml @@ -4,7 +4,7 @@ import Qt 4.7 Rectangle { width: 240; height: 180; color: "white" // ContactModel model is defined in dummydata/ContactModel.qml - // The viewer automatically loads files in dummydata/* to assist + // The launcher automatically loads files in dummydata/* to assist // development without a real data source. // Define a delegate component. A component will be diff --git a/doc/src/snippets/declarative/listview/highlight.qml b/doc/src/snippets/declarative/listview/highlight.qml index 794b3f2..1282f8d 100644 --- a/doc/src/snippets/declarative/listview/highlight.qml +++ b/doc/src/snippets/declarative/listview/highlight.qml @@ -4,7 +4,7 @@ Rectangle { width: 180; height: 200; color: "white" // ContactModel model is defined in dummydata/ContactModel.qml - // The viewer automatically loads files in dummydata/* to assist + // The launcher automatically loads files in dummydata/* to assist // development without a real data source. // Define a delegate component. A component will be diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml index 61bf126..44f0540 100644 --- a/doc/src/snippets/declarative/listview/listview.qml +++ b/doc/src/snippets/declarative/listview/listview.qml @@ -5,7 +5,7 @@ Rectangle { width: 180; height: 200; color: "white" // ContactModel model is defined in dummydata/ContactModel.qml - // The viewer automatically loads files in dummydata/* to assist + // The launcher automatically loads files in dummydata/* to assist // development without a real data source. // Define a delegate component. A component will be diff --git a/examples/declarative/listview/highlight.qml b/examples/declarative/listview/highlight.qml index 50ba2f7..ade355d 100644 --- a/examples/declarative/listview/highlight.qml +++ b/examples/declarative/listview/highlight.qml @@ -4,7 +4,7 @@ Rectangle { width: 400; height: 300 // MyPets model is defined in dummydata/MyPetsModel.qml - // The viewer automatically loads files in dummydata/* to assist + // The launcher automatically loads files in dummydata/* to assist // development without a real data source. // This one contains my pets. diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt index 604c14c..ec8f508 100644 --- a/src/declarative/QmlChanges.txt +++ b/src/declarative/QmlChanges.txt @@ -18,6 +18,11 @@ C++ API QDeclarativeExpression::value() has been renamed to QDeclarativeExpression::evaluate() +QML Launcher +------------ +The standalone executable has been renamed to qml launcher. Runtime warnings +can be now accessed via the menu (Debugging->Show Warnings). + ============================================================================= The changes below are pre Qt 4.7.0 beta 1 diff --git a/tools/qdoc3/test/macros.qdocconf b/tools/qdoc3/test/macros.qdocconf index 22db23e..e7a1dbc 100644 --- a/tools/qdoc3/test/macros.qdocconf +++ b/tools/qdoc3/test/macros.qdocconf @@ -18,6 +18,7 @@ macro.ouml.HTML = "ö" macro.QA = "\\e{Qt Assistant}" macro.QD = "\\e{Qt Designer}" macro.QL = "\\e{Qt Linguist}" +macro.QQL = "\\e{Qt QML Launcher}" macro.param = "\\e" macro.raisedaster.HTML = "*" macro.rarrow.HTML = "→" diff --git a/tools/qml/content/Browser.qml b/tools/qml/content/Browser.qml index 0912f58..c3a2cc0 100644 --- a/tools/qml/content/Browser.qml +++ b/tools/qml/content/Browser.qml @@ -12,12 +12,12 @@ Rectangle { FolderListModel { id: folders1 nameFilters: [ "*.qml" ] - folder: qmlViewerFolder + folder: qmlLauncherFolder } FolderListModel { id: folders2 nameFilters: [ "*.qml" ] - folder: qmlViewerFolder + folder: qmlLauncherFolder } SystemPalette { id: palette } @@ -62,7 +62,7 @@ Rectangle { if (folders.isFolder(index)) { down(filePath); } else { - qmlViewer.launch(filePath); + qmlLauncher.launch(filePath); } } width: root.width diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index d1fc118..380f5cc 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -86,7 +86,7 @@ QString warnings; void showWarnings() { if (!warnings.isEmpty()) { - QMessageBox::warning(0, QApplication::tr("Qt Declarative UI Runtime"), warnings); + QMessageBox::warning(0, QApplication::tr("Qt QML Launcher"), warnings); } } @@ -118,7 +118,7 @@ void usage() qWarning(" -frameless ............................... run with no window frame"); qWarning(" -maximized................................ run maximized"); qWarning(" -fullscreen............................... run fullscreen"); - qWarning(" -stayontop................................ keep viewer window on top"); + qWarning(" -stayontop................................ keep launcher window on top"); qWarning(" -sizeviewtorootobject .................... the view resizes to the changes in the content"); qWarning(" -sizerootobjecttoview .................... the content resizes to the changes in the view"); qWarning(" -qmlbrowser .............................. use a QML-based file browser"); @@ -157,9 +157,9 @@ void scriptOptsUsage() qWarning(" testerror ................................ test 'error' property of root item on playback"); qWarning(" snapshot ................................. file being recorded is static,"); qWarning(" only one frame will be recorded or tested"); - qWarning(" exitoncomplete ........................... cleanly exit the viewer on script completion"); - qWarning(" exitonfailure ............................ immediately exit the viewer on script failure"); - qWarning(" saveonexit ............................... save recording on viewer exit"); + qWarning(" exitoncomplete ........................... cleanly exit the launcher on script completion"); + qWarning(" exitonfailure ............................ immediately exit the launcher on script failure"); + qWarning(" saveonexit ............................... save recording on launcher exit"); qWarning(" "); qWarning(" One of record, play or both must be specified."); exit(1); @@ -197,7 +197,7 @@ int main(int argc, char ** argv) #endif QApplication app(argc, argv); - app.setApplicationName("QtQmlRuntime"); + app.setApplicationName("QtQmlLauncher"); app.setOrganizationName("Nokia"); app.setOrganizationDomain("nokia.com"); @@ -275,7 +275,7 @@ int main(int argc, char ** argv) if (lastArg) usage(); app.setStartDragDistance(QString(argv[++i]).toInt()); } else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) { - qWarning("Qt Qml Runtime version %s", QT_VERSION_STR); + qWarning("Qt QML Launcher version %s", QT_VERSION_STR); exit(0); } else if (arg == "-translation") { if (lastArg) usage(); diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index 77a9533..847ed3a 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -37,5 +37,5 @@ symbian { } mac { QMAKE_INFO_PLIST=Info_mac.plist - TARGET=Qml + TARGET="QML Launcher" } diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 911bf8c..9700090 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -350,7 +350,7 @@ QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) setupProxy(manager); if (cacheSize > 0) { QNetworkDiskCache *cache = new QNetworkDiskCache; - cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-duiviewer-network-cache")); + cache->setCacheDirectory(QDir::tempPath()+QLatin1String("/qml-launcher-network-cache")); cache->setMaximumCacheSize(cacheSize); manager->setCache(cache); } else { @@ -388,7 +388,7 @@ QDeclarativeViewer::QDeclarativeViewer(QWidget *parent, Qt::WindowFlags flags) , translator(0) { QDeclarativeViewer::registerTypes(); - setWindowTitle(tr("Qt Qml Runtime")); + setWindowTitle(tr("Qt QML Launcher")); devicemode = false; canvas = 0; @@ -887,7 +887,7 @@ bool QDeclarativeViewer::open(const QString& file_or_url) url = QUrl::fromLocalFile(fi.absoluteFilePath()); else url = QUrl(file_or_url); - setWindowTitle(tr("%1 - Qt Qml Runtime").arg(file_or_url)); + setWindowTitle(tr("%1 - Qt QML Launcher").arg(file_or_url)); if (!m_script.isEmpty()) tester = new QDeclarativeTester(m_script, m_scriptOptions, canvas); @@ -895,11 +895,11 @@ bool QDeclarativeViewer::open(const QString& file_or_url) delete canvas->rootObject(); canvas->engine()->clearComponentCache(); QDeclarativeContext *ctxt = canvas->rootContext(); - ctxt->setContextProperty("qmlViewer", this); + ctxt->setContextProperty("qmlLauncher", this); #ifdef Q_OS_SYMBIAN - ctxt->setContextProperty("qmlViewerFolder", "E:\\"); // Documents on your S60 phone + ctxt->setContextProperty("qmlLauncherFolder", "E:\\"); // Documents on your S60 phone #else - ctxt->setContextProperty("qmlViewerFolder", QDir::currentPath()); + ctxt->setContextProperty("qmlLauncherFolder", QDir::currentPath()); #endif ctxt->setContextProperty("runtime", Runtime::instance()); -- cgit v0.12