Project

General

Profile

Bug #738 ยป 0008-Qt-Avoid-deprecated-QMouseEvent-globalY-in-Qt6-mode.patch

Marko Lindqvist, 06/28/2024 06:06 PM

View differences:

client/gui-qt/messagewin.cpp
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;
......
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;
    (1-1/1)