diff options
author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-16 10:34:53 +0200 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-16 16:24:21 +0200 |
commit | 38b9c4f327d2860c5d6e6d2cdbd671173a0d75c8 (patch) | |
tree | 6e97e9af55c6f9bee6c7f413a4da009f002ebc14 /examples/quick | |
parent | c430fc856964b8d07cd5bebe874095c7e3a0fc54 (diff) |
Fix additional warnings from usage of deprecated APIs
Replace more QLibaryInfo::location with QLibraryInfo::path
Replace old event accessors APIs, including relevant comments.
Change-Id: Ie205fc93b6e1c0dfb3dca9100fbde417ab68fc9f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/rendercontrol/rendercontrol_d3d11/window.cpp | 4 | ||||
-rw-r--r-- | examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
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); |