MainWindow: use static QSet for filter_events (#20924)

albatross
Dean Lee 2021-05-17 12:21:46 +08:00 committed by GitHub
parent 12ce822252
commit 2c73cac0a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event){
#ifdef QCOM
// filter out touches while in android activity
const QList<QEvent::Type> filter_events = {QEvent::MouseButtonPress, QEvent::MouseMove, QEvent::TouchBegin, QEvent::TouchUpdate, QEvent::TouchEnd};
const static QSet<QEvent::Type> filter_events({QEvent::MouseButtonPress, QEvent::MouseMove, QEvent::TouchBegin, QEvent::TouchUpdate, QEvent::TouchEnd});
if (HardwareEon::launched_activity && filter_events.contains(event->type())) {
HardwareEon::check_activity();
if (HardwareEon::launched_activity) {