Skip to content

Commit

Permalink
debugger/qt/debuggerview.cpp: fix deprecation warning on Qt6
Browse files Browse the repository at this point in the history
  • Loading branch information
angelosa committed Jan 10, 2025
1 parent fe1b9ea commit fef6d57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/osd/modules/debugger/qt/debuggerview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,9 @@ void DebuggerView::mousePressEvent(QMouseEvent *event)
debug_view_xy const topLeft = m_view->visible_position();
debug_view_xy const visibleCharDims = m_view->visible_size();
debug_view_xy clickViewPosition;
clickViewPosition.x = (std::min)(int(topLeft.x + (event->x() / fontWidth)), topLeft.x + visibleCharDims.x - 1);
clickViewPosition.y = (std::min)(int(topLeft.y + (event->y() / fontHeight)), topLeft.y + visibleCharDims.y - 1);
const QPointF mousePosition = event->position();
clickViewPosition.x = (std::min)(int(topLeft.x + (mousePosition.x() / fontWidth)), topLeft.x + visibleCharDims.x - 1);
clickViewPosition.y = (std::min)(int(topLeft.y + (mousePosition.y() / fontHeight)), topLeft.y + visibleCharDims.y - 1);

if (event->button() == Qt::LeftButton)
{
Expand Down

0 comments on commit fef6d57

Please sign in to comment.