qt: Migrate to Qt6. (#6418)

This commit is contained in:
Steveice10 2023-05-05 03:10:34 -07:00 committed by GitHub
parent 70335a7f4d
commit 2273df4d70
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 299 additions and 464 deletions

View file

@ -533,7 +533,7 @@ void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) {
void GRenderWindow::TouchBeginEvent(const QTouchEvent* event) {
// TouchBegin always has exactly one touch point, so take the .first()
const auto [x, y] = ScaleTouch(event->touchPoints().first().pos());
const auto [x, y] = ScaleTouch(event->points().first().position());
this->TouchPressed(x, y);
}
@ -542,10 +542,10 @@ void GRenderWindow::TouchUpdateEvent(const QTouchEvent* event) {
int active_points = 0;
// average all active touch points
for (const auto& tp : event->touchPoints()) {
for (const auto& tp : event->points()) {
if (tp.state() & (Qt::TouchPointPressed | Qt::TouchPointMoved | Qt::TouchPointStationary)) {
active_points++;
pos += tp.pos();
pos += tp.position();
}
}