Commit de3b2b64 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Limit legacy Highdpi tweaks to Qt versions < 5.6.



As of Qt 5.6, Qt will scale automatically. The font hinting
issues on non-Windows OS should also be fixed.
This silences the warning about using the legacy
QT_DEVICE_PIXEL_RATIO variable.

Change-Id: Icc78d990fae67bbd39a57fa1f5b08c592dc9e2ce
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent 6d77db9e
...@@ -292,10 +292,13 @@ static inline QSettings *userSettings() ...@@ -292,10 +292,13 @@ static inline QSettings *userSettings()
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
#if (QT_VERSION < QT_VERSION_CHECK(5, 6, 0))
if (Utils::HostOsInfo().isWindowsHost() if (Utils::HostOsInfo().isWindowsHost()
&& !qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")) { && !qEnvironmentVariableIsSet("QT_DEVICE_PIXEL_RATIO")) {
qputenv("QT_DEVICE_PIXEL_RATIO", "auto"); qputenv("QT_DEVICE_PIXEL_RATIO", "auto");
} }
#endif // < Qt 5.6
QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false")); QLoggingCategory::setFilterRules(QLatin1String("qtc.*.debug=false"));
#ifdef Q_OS_MAC #ifdef Q_OS_MAC
// increase the number of file that can be opened in Qt Creator. // increase the number of file that can be opened in Qt Creator.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment