aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-31 11:35:21 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-09-07 10:32:49 +0000
commitcae36255e3047840a3d2d70db4688e2582675c44 (patch)
tree1517b2dbaa8601198a4a7363d6eacfdfaefa14fc /tools
parent919ef02b03b285b9dd576764d67a011a5969aab5 (diff)
qml/qmlscene: Add command line option -no-scaling for Qt::AA_NoHighDpiScaling.
Task-number: QTBUG-46615 Change-Id: Idcea92d58c1532d956ad6cb16036646c231bb0ac Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/main.cpp3
-rw-r--r--tools/qmlscene/main.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 90d2a940a3..0f16c62320 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -332,6 +332,7 @@ void printUsage()
printf("\t-desktop.......................Force use of desktop GL (AA_UseDesktopOpenGL)\n");
printf("\t-gles..........................Force use of GLES (AA_UseOpenGLES)\n");
printf("\t-software......................Force use of software rendering (AA_UseOpenGLES)\n");
+ printf("\t-no-scaling....................Disable High DPI scaling (AA_NoHighDpiScaling)\n");
printf("\tDebugging options:\n");
printf("\t-verbose ..................... Print information about what qml is doing, like specific file urls being loaded.\n");
printf("\t-translation [file] .......... Load the given file as the translations file.\n");
@@ -503,6 +504,8 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
} else if (arg == QLatin1String("-desktop")) {
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
+ } else if (arg == QLatin1String("-no-scaling")) {
+ QCoreApplication::setAttribute(Qt::AA_NoHighDpiScaling);
} else {
files << arg;
}
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index fe01b92244..3a658d6a81 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -358,6 +358,7 @@ static void usage()
puts(" --desktop..........................Force use of desktop GL (AA_UseDesktopOpenGL)");
puts(" --gles.............................Force use of GLES (AA_UseOpenGLES)");
puts(" --software.........................Force use of software rendering (AA_UseOpenGLES)");
+ puts(" --no-scaling.......................Disable High DPI scaling (AA_NoHighDpiScaling)");
puts(" --verbose..........................Print version and graphical diagnostics for the run-time");
puts(" -I <path> ........................ Add <path> to the list of import paths");
puts(" -P <path> ........................ Add <path> to the list of plugin paths");
@@ -455,6 +456,8 @@ int main(int argc, char ** argv)
options.applicationAttributes.append(Qt::AA_UseSoftwareOpenGL);
else if (lowerArgument == QLatin1String("--desktop"))
options.applicationAttributes.append(Qt::AA_UseDesktopOpenGL);
+ else if (lowerArgument == QLatin1String("--no-scaling"))
+ options.applicationAttributes.append(Qt::AA_NoHighDpiScaling);
else if (lowerArgument == QLatin1String("--verbose"))
options.verbose = true;
else if (lowerArgument == QLatin1String("-i") && i + 1 < argc)