From a0dd5d2b4fdbf6704240265cc4717e2f8ef9c24e Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 23 Nov 2020 19:20:23 +0100 Subject: [PATCH] Fix a warning about using deprecated Qt::AA_EnableHighDpiScaling Task-number: QTCREATORBUG-24098 Change-Id: Ieb58a74e32fd55d95a701299f831d073ebbf4f8e Reviewed-by: Eike Ziller --- .../qmldesigner/designercore/instances/puppetcreator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp index df609f4cb09..743d3051d7a 100644 --- a/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp +++ b/src/plugins/qmldesigner/designercore/instances/puppetcreator.cpp @@ -458,8 +458,12 @@ QProcessEnvironment PuppetCreator::processEnvironment() const environment.set("QML_BAD_GUI_RENDER_LOOP", "true"); environment.set("QML_PUPPET_MODE", "true"); environment.set("QML_DISABLE_DISK_CACHE", "true"); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) if (!environment.hasKey("QT_SCREEN_SCALE_FACTORS") && !environment.hasKey("QT_SCALE_FACTOR") && QApplication::testAttribute(Qt::AA_EnableHighDpiScaling)) +#else + if (!environment.hasKey("QT_SCREEN_SCALE_FACTORS") && !environment.hasKey("QT_SCALE_FACTOR")) +#endif environment.set("QT_AUTO_SCREEN_SCALE_FACTOR", "1"); #ifndef QMLDESIGNER_TEST