diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-27 09:55:44 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-08-27 10:58:53 +0000 |
commit | 8796c382910662bb26b364ec201f2d05e1c851fe (patch) | |
tree | 77206f89c267042b0c2e7a5883e02863f51f0155 | |
parent | bc6d32700cedf7ce9074092cb6f689981c77803d (diff) | |
download | qttools-8796c382910662bb26b364ec201f2d05e1c851fe.tar.gz qttools-8796c382910662bb26b364ec201f2d05e1c851fe.tar.bz2 qttools-8796c382910662bb26b364ec201f2d05e1c851fe.zip |
qtdiag: Output information on HiDpi scaling.
Task-number: QTBUG-46615
Change-Id: Iff96ca3c715a93f3e1e02c8896cfa9cccc7b7eba
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
-rw-r--r-- | src/qtdiag/qtdiag.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/qtdiag/qtdiag.cpp b/src/qtdiag/qtdiag.cpp index 49a585ab..d06a1e71 100644 --- a/src/qtdiag/qtdiag.cpp +++ b/src/qtdiag/qtdiag.cpp @@ -66,6 +66,7 @@ #include <qpa/qplatformscreen.h> #include <qpa/qplatformtheme.h> #include <qpa/qplatformnativeinterface.h> +#include <private/qhighdpiscaling_p.h> #include <algorithm> @@ -376,7 +377,8 @@ QString qtDiag(unsigned flags) const QList<QScreen*> screens = QGuiApplication::screens(); const int screenCount = screens.size(); - str << "\nScreens: " << screenCount << '\n'; + str << "\nScreens: " << screenCount << ", High DPI scaling: " + << (QHighDpiScaling::isActive() ? "active" : "inactive") << '\n'; for (int s = 0; s < screenCount; ++s) { const QScreen *screen = screens.at(s); const QPlatformScreen *platformScreen = screen->handle(); @@ -396,11 +398,12 @@ QString qtDiag(unsigned flags) << ',' << screen->physicalDotsPerInchY() << " Logical DPI: " << screen->logicalDotsPerInchX() << ',' << screen->logicalDotsPerInchY() - << "\n DevicePixelRatio: " << screen->devicePixelRatio(); + << "\n Factor: " << QHighDpiScaling::factor(screen) + << " DevicePixelRatio: " << screen->devicePixelRatio(); if (platformScreen) str << " Pixel density: " << platformScreen->pixelDensity(); - str << " Primary orientation: " << screen->primaryOrientation() - << "\n Orientation: " << screen->orientation() + str << "\n Primary orientation: " << screen->primaryOrientation() + << " Orientation: " << screen->orientation() << " Native orientation: " << screen->nativeOrientation() << " OrientationUpdateMask: " << screen->orientationUpdateMask() << "\n\n"; |