From 2c73cac0a230e57138e5e9cd75e1da76a211e97f Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Mon, 17 May 2021 12:21:46 +0800 Subject: [PATCH] MainWindow: use static QSet for filter_events (#20924) --- selfdrive/ui/qt/window.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/window.cc b/selfdrive/ui/qt/window.cc index 864dabf158..7bf79568a9 100644 --- a/selfdrive/ui/qt/window.cc +++ b/selfdrive/ui/qt/window.cc @@ -75,7 +75,7 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event){ #ifdef QCOM // filter out touches while in android activity - const QList filter_events = {QEvent::MouseButtonPress, QEvent::MouseMove, QEvent::TouchBegin, QEvent::TouchUpdate, QEvent::TouchEnd}; + const static QSet 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) {