summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-15 17:01:23 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-15 19:24:52 +0200
commit6d2ae682b17709161d45b8710acf1107a3fb9a49 (patch)
tree50168f8d772bf4bc176fc6dcae8cff45ca3a1288
parent7519122f087a2af6a101d63373f7c4eaa04f721e (diff)
Fix compile warning from deprecated application attributes
AA_DisableHighDpiScaling and AA_UseHighDpiPixmaps have been deprecated. As of 90358f6042d1fe2db849e17e1b0c875fb0560b20 and 2dc46c09026362cc267b1183faf09fb29479ef93 in qtbase, respectively, these settings are deprecated and have no effect. Remove their setting, and also the respective command line options in Qt Designer and the pixeltool. Change-Id: Iaa057f6a8a8396b822d9190f17e5f9c73e9cc2bb Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/assistant/assistant/main.cpp2
-rw-r--r--src/designer/src/designer/main.cpp17
-rw-r--r--src/designer/src/designer/qdesigner.cpp3
-rw-r--r--src/linguist/linguist/main.cpp3
-rw-r--r--src/pixeltool/main.cpp15
5 files changed, 0 insertions, 40 deletions
diff --git a/src/assistant/assistant/main.cpp b/src/assistant/assistant/main.cpp
index f4abce9a7..f6a3bcf46 100644
--- a/src/assistant/assistant/main.cpp
+++ b/src/assistant/assistant/main.cpp
@@ -362,8 +362,6 @@ static ExitStatus preliminarySetup(CmdLineParser *cmd)
int main(int argc, char *argv[])
{
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
- QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
TRACE_OBJ
QScopedPointer<QCoreApplication> a(createApplication(argc, argv));
#if QT_CONFIG(library)
diff --git a/src/designer/src/designer/main.cpp b/src/designer/src/designer/main.cpp
index cd428bd4f..50c586ccc 100644
--- a/src/designer/src/designer/main.cpp
+++ b/src/designer/src/designer/main.cpp
@@ -34,27 +34,10 @@
QT_USE_NAMESPACE
-static bool isOptionSet(int argc, char *argv[], const char *option)
-{
- for (int i = 1; i < argc; ++i) {
- if (qstrcmp(argv[i], option) == 0)
- return true;
- }
- return false;
-}
-
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(designer);
- // Attributes to be set before QApplication is constructed.
- if (isOptionSet(argc, argv, "--no-scaling")) {
- QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
- } else {
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
- QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
- }
-
// required for QWebEngineView
QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);
diff --git a/src/designer/src/designer/qdesigner.cpp b/src/designer/src/designer/qdesigner.cpp
index 2aef55a70..ea3780af1 100644
--- a/src/designer/src/designer/qdesigner.cpp
+++ b/src/designer/src/designer/qdesigner.cpp
@@ -189,9 +189,6 @@ static inline QDesigner::ParseArgumentsResult
const QCommandLineOption internalDynamicPropertyOption(QStringLiteral("enableinternaldynamicproperties"),
QStringLiteral("Enable internal dynamic properties"));
parser.addOption(internalDynamicPropertyOption);
- const QCommandLineOption noScalingOption(QStringLiteral("no-scaling"),
- QStringLiteral("Disable High DPI scaling"));
- parser.addOption(noScalingOption);
parser.addPositionalArgument(QStringLiteral("files"),
QStringLiteral("The UI files to open."));
diff --git a/src/linguist/linguist/main.cpp b/src/linguist/linguist/main.cpp
index ab14fb78e..df920880e 100644
--- a/src/linguist/linguist/main.cpp
+++ b/src/linguist/linguist/main.cpp
@@ -89,9 +89,6 @@ int main(int argc, char **argv)
{
Q_INIT_RESOURCE(linguist);
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
- QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
-
QApplication app(argc, argv);
QApplication::setOverrideCursor(Qt::WaitCursor);
diff --git a/src/pixeltool/main.cpp b/src/pixeltool/main.cpp
index 3e17d61b5..c4250d367 100644
--- a/src/pixeltool/main.cpp
+++ b/src/pixeltool/main.cpp
@@ -35,20 +35,8 @@
QT_USE_NAMESPACE
-static bool isOptionSet(int argc, char *argv[], const char *option)
-{
- for (int i = 1; i < argc; ++i) {
- if (!qstrcmp(argv[i], option))
- return true;
- }
- return false;
-}
-
int main(int argc, char **argv)
{
- if (isOptionSet(argc, argv, "--no-scaling"))
- QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
-
QApplication app(argc, argv);
QCoreApplication::setApplicationName(QLatin1String("PixelTool"));
QCoreApplication::setApplicationVersion(QLatin1String(QT_VERSION_STR));
@@ -57,9 +45,6 @@ int main(int argc, char **argv)
QCommandLineParser parser;
parser.addHelpOption();
parser.addVersionOption();
- QCommandLineOption noScalingDummy(QStringLiteral("no-scaling"),
- QStringLiteral("Set Qt::AA_DisableHighDpiScaling."));
- parser.addOption(noScalingDummy);
parser.addPositionalArgument(QLatin1String("preview"),
QLatin1String("The preview image to show."));