summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-01-06 09:11:23 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-01-06 13:04:59 +0000
commita62132b22c77c869d8f8e1e48d197bcce53e50a6 (patch)
tree27f54e7afd8b4ff865c3c13fa12ef53c464a376e
parent4f7a72c1ef4c32e28a916b035de7e802a2870a06 (diff)
Diaglib: Output more information about QWindow.
Output surface class/type, screen name and scaling factors. Task-number: QTBUG-50206 Change-Id: I88d3494962b29985cd9e492c1761361b73e0172e Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
-rw-r--r--tests/manual/diaglib/qwindowdump.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp
index a77bae22e9..c0faefb918 100644
--- a/tests/manual/diaglib/qwindowdump.cpp
+++ b/tests/manual/diaglib/qwindowdump.cpp
@@ -38,6 +38,9 @@
# include <QtGui/QScreen>
# include <QtGui/QWindow>
# include <qpa/qplatformwindow.h>
+# if QT_VERSION >= 0x050600
+# include <private/qhighdpiscaling_p.h>
+# endif
#endif
#include <QtCore/QMetaObject>
#include <QtCore/QRect>
@@ -131,9 +134,19 @@ void formatWindow(QTextStream &str, const QWindow *w, FormatWindowOptions option
str << "[top] ";
if (w->isExposed())
str << "[exposed] ";
+ if (w->surfaceClass() == QWindow::Offscreen)
+ str << "[offscreen] ";
+ str << "surface=" << w->surfaceType() << ' ';
if (const Qt::WindowState state = w->windowState())
str << "windowState=" << state << ' ';
formatRect(str, w->geometry());
+ if (w->isTopLevel()) {
+ str << " \"" << w->screen()->name() << "\" ";
+#if QT_VERSION >= 0x050600
+ if (QHighDpiScaling::isActive())
+ str << "factor=" << QHighDpiScaling::factor(w) << ' ';
+#endif
+ }
if (!(options & DontPrintWindowFlags)) {
str << ' ';
formatWindowFlags(str, w->flags());