summaryrefslogtreecommitdiffstats
path: root/tools/qml/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qml/main.cpp')
-rw-r--r--tools/qml/main.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 380f5cc..0cce1cc 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -50,7 +50,6 @@
#include <QDebug>
#include <QMessageBox>
#include "qdeclarativetester.h"
-#include "qdeclarativefolderlistmodel.h"
QT_USE_NAMESPACE
@@ -86,7 +85,7 @@ QString warnings;
void showWarnings()
{
if (!warnings.isEmpty()) {
- QMessageBox::warning(0, QApplication::tr("Qt QML Launcher"), warnings);
+ QMessageBox::warning(0, QApplication::tr("Qt QML Viewer"), warnings);
}
}
@@ -111,14 +110,14 @@ void myMessageOutput(QtMsgType type, const char *msg)
void usage()
{
- qWarning("Usage: qml [options] <filename>");
+ qWarning("Usage: qmlviewer [options] <filename>");
qWarning(" ");
qWarning(" options:");
qWarning(" -v, -version ............................. display version");
qWarning(" -frameless ............................... run with no window frame");
qWarning(" -maximized................................ run maximized");
qWarning(" -fullscreen............................... run fullscreen");
- qWarning(" -stayontop................................ keep launcher window on top");
+ qWarning(" -stayontop................................ keep viewer 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");
@@ -149,7 +148,7 @@ void usage()
void scriptOptsUsage()
{
- qWarning("Usage: qml -scriptopts <option>[,<option>...] ...");
+ qWarning("Usage: qmlviewer -scriptopts <option>[,<option>...] ...");
qWarning(" options:");
qWarning(" record ................................... record a new script");
qWarning(" play ..................................... playback an existing script");
@@ -157,9 +156,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 launcher on script completion");
- qWarning(" exitonfailure ............................ immediately exit the launcher on script failure");
- qWarning(" saveonexit ............................... save recording on launcher exit");
+ 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(" ");
qWarning(" One of record, play or both must be specified.");
exit(1);
@@ -181,7 +180,7 @@ int main(int argc, char ** argv)
atexit(showWarnings);
#endif
-#if defined (Q_WS_X11)
+#if defined (Q_WS_X11) || defined (Q_WS_MAC)
//### default to using raster graphics backend for now
bool gsSpecified = false;
for (int i = 0; i < argc; ++i) {
@@ -197,13 +196,12 @@ int main(int argc, char ** argv)
#endif
QApplication app(argc, argv);
- app.setApplicationName("QtQmlLauncher");
+ app.setApplicationName("QtQmlViewer");
app.setOrganizationName("Nokia");
app.setOrganizationDomain("nokia.com");
QDeclarativeViewer::registerTypes();
QDeclarativeTester::registerTypes();
- QDeclarativeFolderListModel::registerTypes();
bool frameless = false;
QString fileName;
@@ -236,6 +234,10 @@ int main(int argc, char ** argv)
useNativeFileBrowser = false;
#endif
+#if defined(Q_WS_MAC)
+ useGL = true;
+#endif
+
for (int i = 1; i < argc; ++i) {
bool lastArg = (i == argc - 1);
QString arg = argv[i];
@@ -275,7 +277,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 Launcher version %s", QT_VERSION_STR);
+ qWarning("Qt QML Viewer version %s", QT_VERSION_STR);
exit(0);
} else if (arg == "-translation") {
if (lastArg) usage();