From 5bf08251d797a712ada9bb399ac6750d10768c43 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Sat, 19 Jun 2021 05:22:49 +0800 Subject: [PATCH] network_panel: fix ButtonControl build on EON (#21327) old-commit-hash: eb9736fbb003391b1cf19650bce436afe89f31aa --- selfdrive/ui/qt/offroad/settings.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/selfdrive/ui/qt/offroad/settings.cc b/selfdrive/ui/qt/offroad/settings.cc index 48e67c4c52..5256bfa50a 100644 --- a/selfdrive/ui/qt/offroad/settings.cc +++ b/selfdrive/ui/qt/offroad/settings.cc @@ -270,12 +270,14 @@ QWidget * network_panel(QWidget * parent) { layout->setSpacing(30); // wifi + tethering buttons - layout->addWidget(new ButtonControl("WiFi Settings", "OPEN", "", - [=]() { HardwareEon::launch_wifi(); })); + auto wifiBtn = new ButtonControl("WiFi Settings", "OPEN"); + QObject::connect(wifiBtn, &ButtonControl::released, [=]() { HardwareEon::launch_wifi(); }); + layout->addWidget(wifiBtn); layout->addWidget(horizontal_line()); - layout->addWidget(new ButtonControl("Tethering Settings", "OPEN", "", - [=]() { HardwareEon::launch_tethering(); })); + auto tetheringBtn = new ButtonControl("Tethering Settings", "OPEN"); + QObject::connect(tetheringBtn, &ButtonControl::released, [=]() { HardwareEon::launch_tethering(); }); + layout->addWidget(tetheringBtn); layout->addWidget(horizontal_line()); // SSH key management