QDockWidget warning log for an unexpected situation
It didn't enter the original patch because it would prevent it to be backported to 6.2 and 5.15. Change-Id: I9af30b86b98d5d101b0784cf45781cf46d216c6d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> (cherry picked from commit d0505695dd7100412db442824b6b09b7b801fc38) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5fcdf04628
commit
4ac6d161bb
@ -1002,11 +1002,14 @@ bool QDockWidgetPrivate::mouseMoveEvent(QMouseEvent *event)
|
||||
|
||||
// Calculate new nativePos based on startPos + mouse delta move.
|
||||
const QPoint nativeNewPos = nativeWdgOrgPos + (nativeTo - nativeFrom);
|
||||
|
||||
pos = QHighDpiScaling::mapPositionFromNative(nativeNewPos, wdgScreen->handle())
|
||||
- windowMarginOffset;
|
||||
} else {
|
||||
// Fallback in the unlikely case that source and target screens could not be established
|
||||
qCWarning(lcQpaDockWidgets)
|
||||
<< "QDockWidget failed to find relevant screen info. screenFrom:" << screenFrom
|
||||
<< "screenTo:" << screenTo << " wdgScreen:" << wdgScreen << "orgWdgScreen"
|
||||
<< orgWdgScreen;
|
||||
pos = event->globalPosition().toPoint() - state->pressPos - windowMarginOffset;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user