From 18d6d984ccc26cf6288a0f1cefdd535cd76d2625 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 9 Jul 2022 01:10:03 +0300 Subject: [PATCH 57/57] Qt: Avoid deprecated QMouseEvent::globalY() in Qt6-mode See osdn #45044 Signed-off-by: Marko Lindqvist --- client/gui-qt/messagewin.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/gui-qt/messagewin.cpp b/client/gui-qt/messagewin.cpp index 438e3f69ff..3eab3c0300 100644 --- a/client/gui-qt/messagewin.cpp +++ b/client/gui-qt/messagewin.cpp @@ -161,7 +161,11 @@ void info_tab::mouseMoveEvent(QMouseEvent *event) if ((event->buttons() & Qt::LeftButton) && resize_mode && resy) { QPoint to_move; +#ifndef FC_QT5_MODE + int newheight = event->globalPosition().y() - cursor.y() - geometry().y(); +#else // FC_QT5_MODE int newheight = event->globalY() - cursor.y() - geometry().y(); +#endif // FC_QT5_MODE resize(width(), this->geometry().height()-newheight); to_move = mevent_gpos(event) - cursor; @@ -179,7 +183,11 @@ void info_tab::mouseMoveEvent(QMouseEvent *event) setCursor(Qt::SizeVerCursor); } else if (resxy && (event->buttons() & Qt::LeftButton)) { QPoint to_move; +#ifndef FC_QT5_MODE + int newheight = event->globalPosition().y() - cursor.y() - geometry().y(); +#else // FC_QT5_MODE int newheight = event->globalY() - cursor.y() - geometry().y(); +#endif // FC_QT5_MODE resize(ex, this->geometry().height()- newheight); to_move = mevent_gpos(event) - cursor; -- 2.35.1