diff --git a/src/libs/vmisc/def.cpp b/src/libs/vmisc/def.cpp index 1b7d1e4d2..fbb47d3ca 100644 --- a/src/libs/vmisc/def.cpp +++ b/src/libs/vmisc/def.cpp @@ -290,7 +290,9 @@ void InitHighDpiScaling(int argc, char *argv[]) if (IsOptionSet(argc, argv, qPrintable(QLatin1String("--") + LONG_OPTION_NO_HDPI_SCALING))) { #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling); +#endif #else qputenv("QT_DEVICE_PIXEL_RATIO", QByteArray("1")); #endif @@ -298,7 +300,9 @@ void InitHighDpiScaling(int argc, char *argv[]) else { #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support +#endif #else qputenv("QT_AUTO_SCREEN_SCALE_FACTOR", QByteArray("1")); #endif diff --git a/src/libs/vmisc/vabstractapplication.cpp b/src/libs/vmisc/vabstractapplication.cpp index 7de3168b0..46a756c0f 100644 --- a/src/libs/vmisc/vabstractapplication.cpp +++ b/src/libs/vmisc/vabstractapplication.cpp @@ -123,7 +123,7 @@ VAbstractApplication::VAbstractApplication(int &argc, char **argv) QLoggingCategory::setFilterRules(rules); } -#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) +#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // Enable support for HiDPI bitmap resources // The attribute is available since Qt 5.1, but by default disabled. // Because on Windows and Mac OS X we always use last version