Fix a warning about using deprecated Qt::AA_EnableHighDpiScaling

Task-number: QTCREATORBUG-24098
Change-Id: Ieb58a74e32fd55d95a701299f831d073ebbf4f8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2020-11-23 19:20:23 +01:00
parent b801fc7ae7
commit a0dd5d2b4f

View File

@@ -458,8 +458,12 @@ QProcessEnvironment PuppetCreator::processEnvironment() const
environment.set("QML_BAD_GUI_RENDER_LOOP", "true"); environment.set("QML_BAD_GUI_RENDER_LOOP", "true");
environment.set("QML_PUPPET_MODE", "true"); environment.set("QML_PUPPET_MODE", "true");
environment.set("QML_DISABLE_DISK_CACHE", "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") if (!environment.hasKey("QT_SCREEN_SCALE_FACTORS") && !environment.hasKey("QT_SCALE_FACTOR")
&& QApplication::testAttribute(Qt::AA_EnableHighDpiScaling)) && 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"); environment.set("QT_AUTO_SCREEN_SCALE_FACTOR", "1");
#ifndef QMLDESIGNER_TEST #ifndef QMLDESIGNER_TEST