summaryrefslogtreecommitdiffstats
path: root/basicsuite
diff options
context:
space:
mode:
authorMikko Gronoff <mikko.gronoff@qt.io>2018-08-31 10:04:49 +0300
committerMikko Gronoff <mikko.gronoff@qt.io>2018-08-31 07:26:55 +0000
commitd7e97310f2bb13818173afebd1f1d40c616250de (patch)
tree5d3cecda0be02b4245d25a8b6929c4622169fc45 /basicsuite
parentf730907fcfeb2548554f291025f2991598df8fda (diff)
do not enable highdpiscaling on emulator
See QTBUG-64815 Change-Id: I73e0316fd78cbe260c3e22fe21801516bb62ae0c Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Diffstat (limited to 'basicsuite')
-rw-r--r--basicsuite/qtquickcontrols2/gallery.cpp8
-rw-r--r--basicsuite/shared/main.cpp9
2 files changed, 13 insertions, 4 deletions
diff --git a/basicsuite/qtquickcontrols2/gallery.cpp b/basicsuite/qtquickcontrols2/gallery.cpp
index 04b988a..f6c6f66 100644
--- a/basicsuite/qtquickcontrols2/gallery.cpp
+++ b/basicsuite/qtquickcontrols2/gallery.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
@@ -59,7 +59,11 @@ int main(int argc, char *argv[])
{
QGuiApplication::setApplicationName("Gallery");
QGuiApplication::setOrganizationName("QtProject");
- QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+
+ // Do not set HighDpiScaling for emulator, see QTBUG-64815
+ if (qEnvironmentVariableIsEmpty("QTGLESSTREAM_DISPLAY")) {
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ }
QGuiApplication app(argc, argv);
diff --git a/basicsuite/shared/main.cpp b/basicsuite/shared/main.cpp
index e07e09c..e682c67 100644
--- a/basicsuite/shared/main.cpp
+++ b/basicsuite/shared/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the examples of Qt for Device Creation.
@@ -79,7 +79,12 @@ int main(int argc, char **argv)
qputenv("QT_QUICK_CONTROLS_CONF", "/data/user/qt/qtquickcontrols2/qtquickcontrols2.conf");
QIcon::setThemeName("gallery");
QIcon::setThemeSearchPaths(QStringList() << "/data/user/qt/qtquickcontrols2/icons");
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+
+ // Do not set HighDpiScaling for emulator, see QTBUG-64815
+ if (qEnvironmentVariableIsEmpty("QTGLESSTREAM_DISPLAY")) {
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ }
+
QApplication app(argc, argv);
#if defined(USE_QTWEBENGINE)