Fix Qt 6 deprecation warnings
This commit is contained in:
@@ -183,7 +183,11 @@ RendererStack::mouseReleaseEvent(QMouseEvent *event)
|
||||
rw_hwnd = (HWND) this->winId();
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
if (!dopause && this->geometry().contains(m_monitor_index >= 1 ? event->globalPosition().toPoint() : event->position().toPoint()) &&
|
||||
#else
|
||||
if (!dopause && this->geometry().contains(m_monitor_index >= 1 ? event->globalPos() : event->pos()) &&
|
||||
#endif
|
||||
(event->button() == Qt::LeftButton) && !mouse_capture &&
|
||||
(isMouseDown & 1) && (kbd_req_capture || (mouse_get_buttons() != 0)) &&
|
||||
(mouse_input_mode == 0)) {
|
||||
@@ -506,8 +510,13 @@ RendererStack::event(QEvent* event)
|
||||
|
||||
if (m_monitor_index >= 1) {
|
||||
if (mouse_input_mode >= 1) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
mouse_x_abs = (mouse_event->position().x()) / (double)width();
|
||||
mouse_y_abs = (mouse_event->position().y()) / (double)height();
|
||||
#else
|
||||
mouse_x_abs = (mouse_event->localPos().x()) / (double)width();
|
||||
mouse_y_abs = (mouse_event->localPos().y()) / (double)height();
|
||||
#endif
|
||||
if (!mouse_tablet_in_proximity)
|
||||
mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity;
|
||||
mouse_x_abs -= rendererWindow->destinationF.left();
|
||||
@@ -527,8 +536,13 @@ RendererStack::event(QEvent* event)
|
||||
|
||||
#ifdef Q_OS_WINDOWS
|
||||
if (mouse_input_mode == 0) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
mouse_x_abs = (mouse_event->position().x()) / (double)width();
|
||||
mouse_y_abs = (mouse_event->position().y()) / (double)height();
|
||||
#else
|
||||
mouse_x_abs = (mouse_event->localPos().x()) / (double)width();
|
||||
mouse_y_abs = (mouse_event->localPos().y()) / (double)height();
|
||||
#endif
|
||||
mouse_x_abs -= rendererWindow->destinationF.left();
|
||||
mouse_y_abs -= rendererWindow->destinationF.top();
|
||||
|
||||
@@ -544,8 +558,13 @@ RendererStack::event(QEvent* event)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
mouse_x_abs = (mouse_event->position().x()) / (double)width();
|
||||
mouse_y_abs = (mouse_event->position().y()) / (double)height();
|
||||
#else
|
||||
mouse_x_abs = (mouse_event->localPos().x()) / (double)width();
|
||||
mouse_y_abs = (mouse_event->localPos().y()) / (double)height();
|
||||
#endif
|
||||
mouse_x_abs -= rendererWindow->destinationF.left();
|
||||
mouse_y_abs -= rendererWindow->destinationF.top();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user