summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-26 09:01:35 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-08-26 07:34:39 +0000
commitbc6d32700cedf7ce9074092cb6f689981c77803d (patch)
treea545a670fe2bd04a9ec6bdfabef259e7bb2b1cf7
parent8cb396e010d111a65e1250bc441d57f0c57ddb96 (diff)
downloadqttools-bc6d32700cedf7ce9074092cb6f689981c77803d.tar.gz
qttools-bc6d32700cedf7ce9074092cb6f689981c77803d.tar.bz2
qttools-bc6d32700cedf7ce9074092cb6f689981c77803d.zip
qtdiag: Adapt to Qt 5.6.
Output QPlatformScreen::powerState(), QPlatformScreen::pixelDensity() and usage of native message dialog. Change-Id: Iddde2ee93817fa33f381640475a04aeb76f88438 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-rw-r--r--src/qtdiag/qtdiag.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/qtdiag/qtdiag.cpp b/src/qtdiag/qtdiag.cpp
index bc8ed32e..49a585ab 100644
--- a/src/qtdiag/qtdiag.cpp
+++ b/src/qtdiag/qtdiag.cpp
@@ -63,6 +63,7 @@
#include <private/qsimd_p.h>
#include <private/qguiapplication_p.h>
#include <qpa/qplatformintegration.h>
+#include <qpa/qplatformscreen.h>
#include <qpa/qplatformtheme.h>
#include <qpa/qplatformnativeinterface.h>
@@ -370,12 +371,15 @@ QString qtDiag(unsigned flags)
str << " Native color dialog\n";
if (platformTheme->usePlatformNativeDialog(QPlatformTheme::FontDialog))
str << " Native font dialog\n";
+ if (platformTheme->usePlatformNativeDialog(QPlatformTheme::MessageDialog))
+ str << " Native message dialog\n";
const QList<QScreen*> screens = QGuiApplication::screens();
const int screenCount = screens.size();
str << "\nScreens: " << screenCount << '\n';
for (int s = 0; s < screenCount; ++s) {
const QScreen *screen = screens.at(s);
+ const QPlatformScreen *platformScreen = screen->handle();
str << '#' << ' ' << s << " \"" << screen->name() << '"'
<< " Depth: " << screen->depth()
<< " Primary: " << (screen == QGuiApplication::primaryScreen() ? "yes" : "no")
@@ -385,13 +389,17 @@ QString qtDiag(unsigned flags)
if (screen->virtualSiblings().size() > 1)
str << "\n " << screen->virtualSiblings().size() << " virtual siblings";
str << "\n Physical size: " << screen->physicalSize() << " mm"
- << " Refresh: " << screen->refreshRate() << " Hz"
- << "\n Physical DPI: " << screen->physicalDotsPerInchX()
+ << " Refresh: " << screen->refreshRate() << " Hz";
+ if (platformScreen)
+ str << " Power state: " << platformScreen->powerState();
+ str << "\n Physical DPI: " << screen->physicalDotsPerInchX()
<< ',' << screen->physicalDotsPerInchY()
<< " Logical DPI: " << screen->logicalDotsPerInchX()
<< ',' << screen->logicalDotsPerInchY()
- << "\n DevicePixelRatio: " << screen->devicePixelRatio()
- << " Primary orientation: " << screen->primaryOrientation()
+ << "\n DevicePixelRatio: " << screen->devicePixelRatio();
+ if (platformScreen)
+ str << " Pixel density: " << platformScreen->pixelDensity();
+ str << " Primary orientation: " << screen->primaryOrientation()
<< "\n Orientation: " << screen->orientation()
<< " Native orientation: " << screen->nativeOrientation()
<< " OrientationUpdateMask: " << screen->orientationUpdateMask()