Remove use of deprecated High-DPI application attributes
Change-Id: Ibfb50fdcbb51ba93d6e5d11f9e8ce0e7b3bfde79 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
0056a8d9e1
commit
d0eb261836
|
@ -52,7 +52,6 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
QQmlApplicationEngine engine;
|
||||
const QUrl url(QStringLiteral("qrc:/qml-i18n.qml"));
|
||||
|
|
|
@ -66,7 +66,6 @@
|
|||
//![0]
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QList<QObject *> dataList = {
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
//! [1]
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQuickView view;
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
QQmlApplicationEngine engine;
|
||||
|
||||
|
|
|
@ -90,8 +90,6 @@ private:
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
qmlRegisterType<TestModel>("TestModel", 0, 1, "TestModel");
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
qmlRegisterType<InputInspector>("org.qtproject.Test", 1, 0, "InputInspector");
|
||||
|
||||
|
|
|
@ -242,7 +242,6 @@ private:
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
qmlRegisterType<TestTableModel>("TestTableModel", 0, 1, "TestTableModel");
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
qmlRegisterType<StorageModel>("StorageModel", 0, 1, "StorageModel");
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication app(argc, argv);
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
|
|
|
@ -331,10 +331,6 @@ static void getAppFlags(int argc, char **argv)
|
|||
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||
} else if (!strcmp(argv[i], "-software") || !strcmp(argv[i], "--software")) {
|
||||
QCoreApplication::setAttribute(Qt::AA_UseSoftwareOpenGL);
|
||||
} else if (!strcmp(argv[i], "-scaling") || !strcmp(argv[i], "--scaling")) {
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
} else if (!strcmp(argv[i], "-no-scaling") || !strcmp(argv[i], "--no-scaling")) {
|
||||
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
@ -459,12 +455,6 @@ int main(int argc, char *argv[])
|
|||
QCommandLineOption glSoftwareOption(QStringLiteral("software"),
|
||||
QCoreApplication::translate("main", "Force use of software rendering (AA_UseSoftwareOpenGL)."));
|
||||
parser.addOption(glSoftwareOption); // Just for the help text... we've already handled this argument above
|
||||
QCommandLineOption scalingOption(QStringLiteral("scaling"),
|
||||
QCoreApplication::translate("main", "Enable High DPI scaling (AA_EnableHighDpiScaling)."));
|
||||
parser.addOption(scalingOption); // Just for the help text... we've already handled this argument above
|
||||
QCommandLineOption noScalingOption(QStringLiteral("no-scaling"),
|
||||
QCoreApplication::translate("main", "Disable High DPI scaling (AA_DisableHighDpiScaling)."));
|
||||
parser.addOption(noScalingOption); // Just for the help text... we've already handled this argument above
|
||||
#endif // QT_GUI_LIB
|
||||
// Debugging and verbosity options
|
||||
QCommandLineOption quietOption(QStringLiteral("quiet"),
|
||||
|
|
|
@ -360,8 +360,6 @@ 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(" --scaling......................... Enable High DPI scaling (AA_EnableHighDpiScaling)");
|
||||
puts(" --no-scaling...................... Disable High DPI scaling (AA_DisableHighDpiScaling)");
|
||||
puts(" --verbose......................... Print version and graphical diagnostics for the run-time");
|
||||
#ifdef QT_WIDGETS_LIB
|
||||
puts(" --apptype [gui|widgets] .......... Select which application class to use. Default is widgets.");
|
||||
|
@ -444,10 +442,6 @@ int main(int argc, char ** argv)
|
|||
options.applicationAttributes.append(Qt::AA_UseSoftwareOpenGL);
|
||||
} else if (!qstrcmp(arg, "--desktop")) {
|
||||
options.applicationAttributes.append(Qt::AA_UseDesktopOpenGL);
|
||||
} else if (!qstrcmp(arg, "--scaling")) {
|
||||
options.applicationAttributes.append(Qt::AA_EnableHighDpiScaling);
|
||||
} else if (!qstrcmp(arg, "--no-scaling")) {
|
||||
options.applicationAttributes.append(Qt::AA_DisableHighDpiScaling);
|
||||
} else if (!qstrcmp(arg, "--transparent")) {
|
||||
options.transparent = true;
|
||||
} else if (!qstrcmp(arg, "--multisample")) {
|
||||
|
|
Loading…
Reference in New Issue