aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qmlviewer
diff options
context:
space:
mode:
authorQt by Nokia <qt-info@nokia.com>2011-04-27 14:13:26 +0200
committeraxis <qt-info@nokia.com>2011-04-27 14:40:44 +0200
commita129444bb0156c936900dbd2f12bd9f427ff366c (patch)
treee2e8e77f185d5a5ac32ea0a96cd9945c742e8663 /tools/qmlviewer
parent885735d011472bcfbb96e688d9e64553d7fe9d4b (diff)
Initial import from qtquick2.
Branched from the monolithic repo, Qt qtquick2 branch, at commit a4a585d2ee907746682846ae6e8a48e19deef469
Diffstat (limited to 'tools/qmlviewer')
-rw-r--r--tools/qmlviewer/main.cpp7
-rw-r--r--tools/qmlviewer/qmlruntime.cpp1
2 files changed, 5 insertions, 3 deletions
diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp
index b2c7f4f730..b1a10ff6c4 100644
--- a/tools/qmlviewer/main.cpp
+++ b/tools/qmlviewer/main.cpp
@@ -156,7 +156,9 @@ void usage()
qWarning(" -P <directory> ........................... prepend to the plugin search path");
#if defined(Q_WS_MAC)
qWarning(" -no-opengl ............................... don't use a QGLWidget for the viewport");
+ qWarning(" -opengl .................................. use a QGLWidget for the viewport (default)");
#else
+ qWarning(" -no-opengl ............................... don't use a QGLWidget for the viewport (default)");
qWarning(" -opengl .................................. use a QGLWidget for the viewport");
#endif
qWarning(" -script <path> ........................... set the script to use");
@@ -375,13 +377,10 @@ static void parseCommandLineOptions(const QStringList &arguments)
} else if (arg == "-translation") {
if (lastArg) usage();
opts.translationFile = arguments.at(++i);
-#if defined(Q_WS_MAC)
} else if (arg == "-no-opengl") {
opts.useGL = false;
-#else
} else if (arg == "-opengl") {
opts.useGL = true;
-#endif
} else if (arg == "-qmlbrowser") {
opts.useNativeFileBrowser = false;
} else if (arg == "-warnings") {
@@ -522,6 +521,8 @@ QDeclarativeViewer *openFile(const QString &fileName)
int main(int argc, char ** argv)
{
+ QDeclarativeDebugHelper::enableDebugging();
+
systemMsgOutput = qInstallMsgHandler(myMessageOutput);
#if defined (Q_WS_X11) || defined (Q_WS_MAC)
diff --git a/tools/qmlviewer/qmlruntime.cpp b/tools/qmlviewer/qmlruntime.cpp
index 36915d12bf..4bae7f3ec0 100644
--- a/tools/qmlviewer/qmlruntime.cpp
+++ b/tools/qmlviewer/qmlruntime.cpp
@@ -1477,6 +1477,7 @@ void QDeclarativeViewer::setUseGL(bool useGL)
QGLFormat format = QGLFormat::defaultFormat();
#ifdef Q_WS_MAC
format.setSampleBuffers(true);
+ format.setSwapInterval(1);
#else
format.setSampleBuffers(false);
#endif