summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-06-10 13:40:48 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-06-10 13:40:48 +0200
commit53bbcf5038a9ec5c5381e25968cb51b76cf4a2d6 (patch)
tree18c030ab16d815bc10b89aea47f30cdd01036937 /tools
parent77dfbea79094be6b763319fcca03f6b48ab8248e (diff)
Disable vsync animations by default
Diffstat (limited to 'tools')
-rw-r--r--tools/qmlscene/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 765a9dc2fb..d351b27e7e 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -252,6 +252,7 @@ struct Options
, scenegraphOnGraphicsview(false)
, clip(false)
, versionDetection(true)
+ , vsync(true)
{
}
@@ -263,6 +264,7 @@ struct Options
bool scenegraphOnGraphicsview;
bool clip;
bool versionDetection;
+ bool vsync;
};
#if defined(QMLSCENE_BUNDLE)
@@ -440,6 +442,7 @@ static void usage()
qWarning(" --sg-on-gv [--clip] ....................... Scenegraph on graphicsview (and clip to item)");
#endif
qWarning(" --no-version-detection .................... Do not try to detect the version of the .qml file");
+ qWarning(" --no-vsync-animations ..................... Do not use vsync based animations");
qWarning(" ");
exit(1);
@@ -474,6 +477,8 @@ int main(int argc, char ** argv)
options.versionDetection = false;
else if (QString::fromLatin1(argv[i]).toLower() == QLatin1String("-i") && i + 1 < argc)
imports.append(QString::fromLatin1(argv[++i]));
+ else if (QString::fromLatin1(argv[i]).toLower() == QLatin1String("--no-vsync-animations"))
+ options.vsync = false;
else if (QString::fromLatin1(argv[i]).toLower() == QLatin1String("--help")
|| QString::fromLatin1(argv[i]).toLower() == QLatin1String("-help")
|| QString::fromLatin1(argv[i]).toLower() == QLatin1String("--h")
@@ -520,6 +525,7 @@ int main(int argc, char ** argv)
if (options.versionDetection)
checkAndAdaptVersion(options.file);
QSGView *qxView = new MyQSGView();
+ qxView->setVSyncAnimations(options.vsync);
engine = qxView->engine();
for (int i = 0; i < imports.size(); ++i)
engine->addImportPath(imports.at(i));