aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickwindow.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2016-08-01 17:09:50 +0200
committerShawn Rutledge <shawn.rutledge@qt.io>2016-08-01 21:53:31 +0000
commit3dd1578386fc9fa5fdea666bff47ff60174b270b (patch)
tree0b0b7631aff6509718580565d471769d2de2c8da /src/quick/items/qquickwindow.cpp
parentf059e47a8450051f8ee9145d618f4bfc72d4793f (diff)
Rename touchEventAccepted to match its purpose
The bool is used to check if the touch or mouse event is accepted, so just call it eventAccepted. Change-Id: If22c9f759411edb9357a68273bcaa44364acc4e1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quick/items/qquickwindow.cpp')
-rw-r--r--src/quick/items/qquickwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index cc422361f8..d07778b8bc 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -2263,7 +2263,7 @@ bool QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, const QQ
return false;
qCDebug(DBG_TOUCH) << " - considering delivering " << touchEvent.data() << " to " << item;
- bool touchEventAccepted = false;
+ bool eventAccepted = false;
// First check whether the parent wants to be a filter,
// and if the parent accepts the event we are done.
@@ -2280,17 +2280,17 @@ bool QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, const QQ
// Deliver the touch event to the given item
qCDebug(DBG_TOUCH) << " - actually delivering " << touchEvent.data() << " to " << item;
QCoreApplication::sendEvent(item, touchEvent.data());
- touchEventAccepted = touchEvent->isAccepted();
+ eventAccepted = touchEvent->isAccepted();
// If the touch event wasn't accepted, synthesize a mouse event and see if the item wants it.
QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item);
- if (!touchEventAccepted && (itemPrivate->acceptedMouseButtons() & Qt::LeftButton)) {
+ if (!eventAccepted && (itemPrivate->acceptedMouseButtons() & Qt::LeftButton)) {
// send mouse event
if (translateTouchToMouse(item, touchEvent.data()))
- touchEventAccepted = true;
+ eventAccepted = true;
}
- if (touchEventAccepted) {
+ if (eventAccepted) {
// If the touch was accepted (regardless by whom or in what form),
// update accepted new points.
for (auto point: qAsConst(touchEvent->touchPoints())) {
@@ -2312,7 +2312,7 @@ bool QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, const QQ
}
}
- return touchEventAccepted;
+ return eventAccepted;
}
// create touch event containing only points inside the target item