Skip to content

Commit

Permalink
QDockWidget warning log for an unexpected situation
Browse files Browse the repository at this point in the history
It didn't enter the original patch because it would
prevent it to be backported to 6.2 and 5.15.

Pick-to: 6.3 6.4
Change-Id: I9af30b86b98d5d101b0784cf45781cf46d216c6d
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Shawn Rutledge <[email protected]>
  • Loading branch information
tmartsum committed Jul 5, 2022
1 parent 76b07b0 commit d050569
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/widgets/widgets/qdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d050569

Please sign in to comment.