From d655391d010952c75674c7adb8303d5f0375610d Mon Sep 17 00:00:00 2001 From: Axel Spoerl Date: Wed, 16 Nov 2022 16:39:11 +0100 Subject: [PATCH] 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 --- src/widgets/widgets/qdockwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qdockwidget.cpp b/src/widgets/widgets/qdockwidget.cpp index 0c2777698a3..67bb0994464 100644 --- a/src/widgets/widgets/qdockwidget.cpp +++ b/src/widgets/widgets/qdockwidget.cpp @@ -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;