Avoid useless handleTouchEvent call

The call when allReleased is true is a historical artifact: Originally
the call was necessary to generate a TouchEnd. Later the determination
of the event type got moved to QWindowSystemInterface. As a result the
call is completely superfluous since it will bail out immediately.

Task-number: QTBUG-36473
Change-Id: If1a270445a620e6f795912873c60fb1a05384964
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Laszlo Agocs 2014-09-06 21:28:01 +02:00
parent 0fdbe40ad4
commit 767cc05e57

View File

@ -983,14 +983,12 @@ void QWaylandInputDevice::Touch::touch_frame()
}
QWindowSystemInterface::handleTouchEvent(window, mParent->mTouchDevice, mTouchPoints);
const bool allReleased = allTouchPointsReleased();
mPrevTouchPoints = mTouchPoints;
mTouchPoints.clear();
if (allReleased) {
QWindowSystemInterface::handleTouchEvent(window, mParent->mTouchDevice, mTouchPoints);
if (allTouchPointsReleased())
mPrevTouchPoints.clear();
}
else
mPrevTouchPoints = mTouchPoints;
mTouchPoints.clear();
}
QT_END_NAMESPACE