From a061a646429c6e9d695458fc0ecb0021a30e12ee Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Thu, 4 Jun 2020 18:07:06 +0200 Subject: Replace calls to deprecated QEvent accessor functions Many of these were generated by clazy using the new qevent-accessors check. Change-Id: Ie17af17f50fdc9f47d7859d267c14568cc350fd0 Reviewed-by: Volker Hilsheimer --- examples/vulkan/hellovulkancubes/vulkanwindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/vulkan') diff --git a/examples/vulkan/hellovulkancubes/vulkanwindow.cpp b/examples/vulkan/hellovulkancubes/vulkanwindow.cpp index 9a4eaf1901..3440713737 100644 --- a/examples/vulkan/hellovulkancubes/vulkanwindow.cpp +++ b/examples/vulkan/hellovulkancubes/vulkanwindow.cpp @@ -82,7 +82,7 @@ void VulkanWindow::meshSwitched(bool enable) void VulkanWindow::mousePressEvent(QMouseEvent *e) { m_pressed = true; - m_lastPos = e->pos(); + m_lastPos = e->position().toPoint(); } void VulkanWindow::mouseReleaseEvent(QMouseEvent *) @@ -95,8 +95,8 @@ void VulkanWindow::mouseMoveEvent(QMouseEvent *e) if (!m_pressed) return; - int dx = e->pos().x() - m_lastPos.x(); - int dy = e->pos().y() - m_lastPos.y(); + int dx = e->position().toPoint().x() - m_lastPos.x(); + int dy = e->position().toPoint().y() - m_lastPos.y(); if (dy) m_renderer->pitch(dy / 10.0f); @@ -104,7 +104,7 @@ void VulkanWindow::mouseMoveEvent(QMouseEvent *e) if (dx) m_renderer->yaw(dx / 10.0f); - m_lastPos = e->pos(); + m_lastPos = e->position().toPoint(); } void VulkanWindow::keyPressEvent(QKeyEvent *e) -- cgit v1.2.3