From 38b9c4f327d2860c5d6e6d2cdbd671173a0d75c8 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 16 Sep 2020 10:34:53 +0200 Subject: Fix additional warnings from usage of deprecated APIs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace more QLibaryInfo::location with QLibraryInfo::path Replace old event accessors APIs, including relevant comments. Change-Id: Ie205fc93b6e1c0dfb3dca9100fbde417ab68fc9f Reviewed-by: Tor Arne Vestbø Reviewed-by: Shawn Rutledge --- examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp | 4 ++-- .../rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp b/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp index 884f7e3981..918698effe 100644 --- a/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp +++ b/examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp @@ -175,13 +175,13 @@ void Window::exposeEvent(QExposeEvent *) void Window::mousePressEvent(QMouseEvent *e) { - QMouseEvent mappedEvent(e->type(), e->localPos(), e->screenPos(), e->button(), e->buttons(), e->modifiers()); + QMouseEvent mappedEvent(e->type(), e->position(), e->globalPosition(), e->button(), e->buttons(), e->modifiers()); QCoreApplication::sendEvent(m_quickWindow, &mappedEvent); } void Window::mouseReleaseEvent(QMouseEvent *e) { - QMouseEvent mappedEvent(e->type(), e->localPos(), e->screenPos(), e->button(), e->buttons(), e->modifiers()); + QMouseEvent mappedEvent(e->type(), e->position(), e->globalPosition(), e->button(), e->buttons(), e->modifiers()); QCoreApplication::sendEvent(m_quickWindow, &mappedEvent); } diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp index 8f3bfe77db..8316772d3c 100644 --- a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp +++ b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp @@ -318,9 +318,9 @@ void WindowSingleThreaded::handleScreenChange() void WindowSingleThreaded::mousePressEvent(QMouseEvent *e) { - // Use the constructor taking localPos and screenPos. That puts localPos into the - // event's localPos and windowPos, and screenPos into the event's screenPos. This way - // the windowPos in e is ignored and is replaced by localPos. This is necessary + // Use the constructor taking position and globalPosition. That puts position into the + // event's position and scenePosition, and globalPosition into the event's globalPosition. This way + // the scenePosition in e is ignored and is replaced by position. This is necessary // because QQuickWindow thinks of itself as a top-level window always. QMouseEvent mappedEvent(e->type(), e->position(), e->globalPosition(), e->button(), e->buttons(), e->modifiers()); QCoreApplication::sendEvent(m_quickWindow, &mappedEvent); -- cgit v1.2.3