diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-11-13 11:35:09 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2020-11-13 11:07:07 +0000 |
commit | 1fd7e9b24259491bb930ae0b2f2d26c834913fe4 (patch) | |
tree | 8e13f1e401e54425694b457f382b63937b789e20 /src/app | |
parent | 98db9774f2363314f51b1732646396112418320e (diff) | |
download | qt-creator-1fd7e9b24259491bb930ae0b2f2d26c834913fe4.tar.gz |
Get rid of setting deprecated attributes in Qt 6
Setting AA_EnableHighDpiScaling and AA_UseHighDpiPixmaps
attributes does nothing in Qt 6.
Change-Id: I1744604f34294d809c594c66ef86b610ed6efb16
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/main.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/app/main.cpp b/src/app/main.cpp index 76a15ccb7d..80699957df 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -341,12 +341,14 @@ static void setHighDpiEnvironmentVariable() && !qEnvironmentVariableIsSet("QT_AUTO_SCREEN_SCALE_FACTOR") && !qEnvironmentVariableIsSet("QT_SCALE_FACTOR") && !qEnvironmentVariableIsSet("QT_SCREEN_SCALE_FACTORS")) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #if QT_VERSION == QT_VERSION_CHECK(5, 14, 0) // work around QTBUG-80934 QGuiApplication::setHighDpiScaleFactorRoundingPolicy( Qt::HighDpiScaleFactorRoundingPolicy::Round); #endif +#endif } } @@ -557,8 +559,8 @@ int main(int argc, char **argv) CrashHandlerSetup::EnableRestart, libexecPath); #endif - app.setAttribute(Qt::AA_UseHighDpiPixmaps); #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + app.setAttribute(Qt::AA_UseHighDpiPixmaps); app.setAttribute(Qt::AA_DisableWindowContextHelpButton); #endif |