Print QScreen geometry debug state using the underlying types
A QRect is unambiguous, and easier to parse than a custom rect format. Change-Id: If8c197a5e522744b9629d5d89536df5c0da7308c Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
f7a56b32cc
commit
1480588f44
@ -779,13 +779,6 @@ void *QScreen::resolveInterface(const char *name, int revision) const
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
|
||||
static inline void formatRect(QDebug &debug, const QRect r)
|
||||
{
|
||||
debug << r.width() << 'x' << r.height()
|
||||
<< Qt::forcesign << r.x() << r.y() << Qt::noforcesign;
|
||||
}
|
||||
|
||||
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QScreen *screen)
|
||||
{
|
||||
const QDebugStateSaver saver(debug);
|
||||
@ -796,10 +789,8 @@ Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QScreen *screen)
|
||||
if (debug.verbosity() > 2) {
|
||||
if (screen == QGuiApplication::primaryScreen())
|
||||
debug << ", primary";
|
||||
debug << ", geometry=";
|
||||
formatRect(debug, screen->geometry());
|
||||
debug << ", available=";
|
||||
formatRect(debug, screen->availableGeometry());
|
||||
debug << ", geometry=" << screen->geometry();
|
||||
debug << ", available=" << screen->availableGeometry();
|
||||
debug << ", logical DPI=" << screen->logicalDotsPerInchX()
|
||||
<< ',' << screen->logicalDotsPerInchY()
|
||||
<< ", physical DPI=" << screen->physicalDotsPerInchX()
|
||||
|
Loading…
x
Reference in New Issue
Block a user