diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-06-04 18:07:06 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-06-08 19:11:51 +0200 |
commit | a061a646429c6e9d695458fc0ecb0021a30e12ee (patch) | |
tree | 7ba6fce7ee7c8975b0c50e31195bd02c5419fc15 /examples/vulkan | |
parent | 24e52c10deedbaef833c0e2c3ee7bee03eacc4f5 (diff) |
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 <volker.hilsheimer@qt.io>
Diffstat (limited to 'examples/vulkan')
-rw-r--r-- | examples/vulkan/hellovulkancubes/vulkanwindow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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) |