summaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/diaglib/qwidgetdump.cpp6
-rw-r--r--tests/manual/diaglib/qwindowdump.cpp4
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/manual/diaglib/qwidgetdump.cpp b/tests/manual/diaglib/qwidgetdump.cpp
index 10cfde510d..6c1e7d8f79 100644
--- a/tests/manual/diaglib/qwidgetdump.cpp
+++ b/tests/manual/diaglib/qwidgetdump.cpp
@@ -96,6 +96,12 @@ static void dumpWidgetRecursion(QTextStream &str, const QWidget *w,
str << "windowState=" << hex << showbase << states << dec << noshowbase << ' ';
formatRect(str, w->geometry());
if (w->isWindow()) {
+ str << ' ' << w->logicalDpiX() << "DPI";
+#if QT_VERSION > 0x050600
+ const qreal dpr = w->devicePixelRatioF();
+ if (!qFuzzyCompare(dpr, qreal(1)))
+ str << " dpr=" << dpr;
+#endif // Qt 5.6
const QRect normalGeometry = w->normalGeometry();
if (normalGeometry.isValid() && !normalGeometry.isEmpty() && normalGeometry != w->geometry()) {
str << " normal=";
diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp
index 4adb1da5f1..0e613753ef 100644
--- a/tests/manual/diaglib/qwindowdump.cpp
+++ b/tests/manual/diaglib/qwindowdump.cpp
@@ -138,7 +138,7 @@ void formatWindow(QTextStream &str, const QWindow *w, FormatWindowOptions option
str << " \"" << w->screen()->name() << "\" ";
#if QT_VERSION >= 0x050600
if (QHighDpiScaling::isActive())
- str << "factor=" << QHighDpiScaling::factor(w) << ' ';
+ str << "factor=" << QHighDpiScaling::factor(w) << " dpr=" << w->devicePixelRatio();
#endif
}
if (!(options & DontPrintWindowFlags)) {
@@ -161,7 +161,7 @@ static void dumpWindowRecursion(QTextStream &str, const QWindow *w,
FormatWindowOptions options = 0, int depth = 0)
{
indentStream(str, 2 * depth);
- formatWindow(str, w);
+ formatWindow(str, w, options);
foreach (const QObject *co, w->children()) {
if (co->isWindowType())
dumpWindowRecursion(str, static_cast<const QWindow *>(co), options, depth + 1);