Revert "qmlscene/qml tools: Temporarily disable High DPI options."
Re-enable the options after the attributes have their final names.
Add options for enabling scaling.
This reverts commit 051684f125
.
Task-number: QTBUG-46615
Task-number: QTBUG-48379
Change-Id: If862061c688f9febff3b9511a4f19649b07d2011
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
This commit is contained in:
parent
dbc147b2e7
commit
0b51b08fcd
|
@ -332,9 +332,8 @@ void printUsage()
|
||||||
printf("\t-desktop.......................Force use of desktop GL (AA_UseDesktopOpenGL)\n");
|
printf("\t-desktop.......................Force use of desktop GL (AA_UseDesktopOpenGL)\n");
|
||||||
printf("\t-gles..........................Force use of GLES (AA_UseOpenGLES)\n");
|
printf("\t-gles..........................Force use of GLES (AA_UseOpenGLES)\n");
|
||||||
printf("\t-software......................Force use of software rendering (AA_UseOpenGLES)\n");
|
printf("\t-software......................Force use of software rendering (AA_UseOpenGLES)\n");
|
||||||
#if 0 // FIXME: 5.6: Re-enable once attribute naming is final (QTBUG-46615)
|
printf("\t-scaling.......................Enable High DPI scaling (AA_EnableHighDpiScaling)\n");
|
||||||
printf("\t-no-scaling....................Disable High DPI scaling (AA_NoHighDpiScaling)\n");
|
printf("\t-no-scaling....................Disable High DPI scaling (AA_DisableHighDpiScaling)\n");
|
||||||
#endif
|
|
||||||
printf("\tDebugging options:\n");
|
printf("\tDebugging options:\n");
|
||||||
printf("\t-verbose ..................... Print information about what qml is doing, like specific file urls being loaded.\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");
|
printf("\t-translation [file] .......... Load the given file as the translations file.\n");
|
||||||
|
@ -506,10 +505,10 @@ int main(int argc, char *argv[])
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
||||||
} else if (arg == QLatin1String("-desktop")) {
|
} else if (arg == QLatin1String("-desktop")) {
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
|
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
|
||||||
#if 0 // FIXME: 5.6: Re-enable once attribute naming is final (QTBUG-46615)
|
} else if (arg == QLatin1String("-scaling")) {
|
||||||
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
} else if (arg == QLatin1String("-no-scaling")) {
|
} else if (arg == QLatin1String("-no-scaling")) {
|
||||||
QCoreApplication::setAttribute(Qt::AA_NoHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
files << arg;
|
files << arg;
|
||||||
}
|
}
|
||||||
|
|
|
@ -356,9 +356,8 @@ static void usage()
|
||||||
puts(" --desktop..........................Force use of desktop GL (AA_UseDesktopOpenGL)");
|
puts(" --desktop..........................Force use of desktop GL (AA_UseDesktopOpenGL)");
|
||||||
puts(" --gles.............................Force use of GLES (AA_UseOpenGLES)");
|
puts(" --gles.............................Force use of GLES (AA_UseOpenGLES)");
|
||||||
puts(" --software.........................Force use of software rendering (AA_UseOpenGLES)");
|
puts(" --software.........................Force use of software rendering (AA_UseOpenGLES)");
|
||||||
#if 0 // FIXME: 5.6: Re-enable once attribute naming is final (QTBUG-46615)
|
puts(" --scaling..........................Enable High DPI scaling (AA_EnableHighDpiScaling)");
|
||||||
puts(" --no-scaling.......................Disable High DPI scaling (AA_NoHighDpiScaling)");
|
puts(" --no-scaling.......................Disable High DPI scaling (AA_DisableHighDpiScaling)");
|
||||||
#endif
|
|
||||||
puts(" --verbose..........................Print version and graphical diagnostics for the run-time");
|
puts(" --verbose..........................Print version and graphical diagnostics for the run-time");
|
||||||
puts(" -I <path> ........................ Add <path> to the list of import paths");
|
puts(" -I <path> ........................ Add <path> to the list of import paths");
|
||||||
puts(" -P <path> ........................ Add <path> to the list of plugin paths");
|
puts(" -P <path> ........................ Add <path> to the list of plugin paths");
|
||||||
|
@ -453,10 +452,10 @@ int main(int argc, char ** argv)
|
||||||
options.applicationAttributes.append(Qt::AA_UseSoftwareOpenGL);
|
options.applicationAttributes.append(Qt::AA_UseSoftwareOpenGL);
|
||||||
else if (!qstrcmp(arg, "--desktop"))
|
else if (!qstrcmp(arg, "--desktop"))
|
||||||
options.applicationAttributes.append(Qt::AA_UseDesktopOpenGL);
|
options.applicationAttributes.append(Qt::AA_UseDesktopOpenGL);
|
||||||
#if 0 // FIXME: 5.6: Re-enable once attribute naming is final (QTBUG-46615)
|
else if (!qstrcmp(arg, "--scaling"))
|
||||||
|
options.applicationAttributes.append(Qt::AA_EnableHighDpiScaling);
|
||||||
else if (!qstrcmp(arg, "--no-scaling"))
|
else if (!qstrcmp(arg, "--no-scaling"))
|
||||||
options.applicationAttributes.append(Qt::AA_NoHighDpiScaling);
|
options.applicationAttributes.append(Qt::AA_DisableHighDpiScaling);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (Qt::ApplicationAttribute a, options.applicationAttributes)
|
foreach (Qt::ApplicationAttribute a, options.applicationAttributes)
|
||||||
|
|
Loading…
Reference in New Issue