summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaj Grönholm <kgronholm@gmail.com>2010-02-18 04:48:31 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-02-19 00:19:58 (GMT)
commitda055325393872e9399577d1962486fb6e3102c7 (patch)
tree740f550c69f2369cd4ed7dd9ea27d25111ad066a
parent635b329592f26d64eeb6212b6056249b15293dcf (diff)
downloadQt-da055325393872e9399577d1962486fb6e3102c7.zip
Qt-da055325393872e9399577d1962486fb6e3102c7.tar.gz
Qt-da055325393872e9399577d1962486fb6e3102c7.tar.bz2
Add support for startDragDistance in qmlviewer.
Adding new parameter "-dragthreshold <size>" which sets mouse drag threshold in pixels. Using this makes qmlviewer more usable in touchscreen devices, where applications may require different thresholds. Merge-request: 6 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
-rw-r--r--tools/qmlviewer/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/qmlviewer/main.cpp b/tools/qmlviewer/main.cpp
index 14a4735..8cff271 100644
--- a/tools/qmlviewer/main.cpp
+++ b/tools/qmlviewer/main.cpp
@@ -95,6 +95,7 @@ void usage()
qWarning(" -record arg .............................. add a recording process argument");
qWarning(" -autorecord [from-]<tomilliseconds> ...... set recording to start and stop");
qWarning(" -devicekeys .............................. use numeric keys (see F1)");
+ qWarning(" -dragthreshold <size> .................... set mouse drag threshold size");
qWarning(" -netcache <size> ......................... set disk cache to size bytes");
qWarning(" -translation <translationfile> ........... set the language to run in");
qWarning(" -L <directory> ........................... prepend to the library search path");
@@ -217,6 +218,9 @@ int main(int argc, char ** argv)
autorecord_to = range.mid(dash+1).toInt();
} else if (arg == "-devicekeys") {
devkeys = true;
+ } else if (arg == "-dragthreshold") {
+ if (lastArg) usage();
+ app.setStartDragDistance(QString(argv[++i]).toInt());
} else if (arg == QLatin1String("-v") || arg == QLatin1String("-version")) {
fprintf(stderr, "Qt Declarative UI Viewer version %s\n", QT_VERSION_STR);
return 0;