Fix warning about comparing different enums

QEventPoint::state() returns a QEventPoint::State value, not
a Qt::TouchPointState value.
This commit is contained in:
Vlad Zahorodnii 2023-03-14 15:04:05 +02:00
parent b2a50cffd8
commit af4397581a

View file

@ -454,7 +454,7 @@ void OffscreenQuickView::Private::updateTouchState(Qt::TouchPointState state, qi
// points to Stationary so we only have one touch point with a different // points to Stationary so we only have one touch point with a different
// state. // state.
touchPoints.erase(std::remove_if(touchPoints.begin(), touchPoints.end(), [](QTouchEvent::TouchPoint &point) { touchPoints.erase(std::remove_if(touchPoints.begin(), touchPoints.end(), [](QTouchEvent::TouchPoint &point) {
if (point.state() == Qt::TouchPointReleased) { if (point.state() == QEventPoint::Released) {
return true; return true;
} }
QMutableEventPoint::setState(point, QEventPoint::Stationary); QMutableEventPoint::setState(point, QEventPoint::Stationary);