Replace warning with debug message in dockwidget high DPI mapping

When a dock widget is moved between high DPI screens, it's native
position is calculated and applied. The calculation falls back to a
mapping without high DPI, if the dock widget's initial position cannot
be mapped to a QScreen.

A warning was emitted in that case, to inform the user about a
potential screen misconfiguration (e.g. a physical screens not being
mapped exactly next to each other, leaving a gap). Despite of the
warning, the position calculation safely falls back to non high DPI.

The warning also kicks in when the dock widget's top left position
is located outside a screen, hence being invisible.

Since calculating an invisible top left position is possible without
high DPI mapping, this patch replaces the warning with a
debug message.

Fixes: QTBUG-108311
Pick-to: 6.4
Change-Id: I692034e5aeb5f7a94cca519ce055795fa72ea216
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
This commit is contained in:
Axel Spoerl 2022-11-16 16:39:11 +01:00
parent 7ea689c613
commit d655391d01

View File

@ -1006,7 +1006,7 @@ bool QDockWidgetPrivate::mouseMoveEvent(QMouseEvent *event)
- windowMarginOffset;
} else {
// Fallback in the unlikely case that source and target screens could not be established
qCWarning(lcQpaDockWidgets)
qCDebug(lcQpaDockWidgets)
<< "QDockWidget failed to find relevant screen info. screenFrom:" << screenFrom
<< "screenTo:" << screenTo << " wdgScreen:" << wdgScreen << "orgWdgScreen"
<< orgWdgScreen;