Qt-UI fix escaping all wifi access points (#20147)

* fix wifi escaping

* less code

Co-authored-by: Comma Device <device@comma.ai>
pull/20149/head
grekiki 4 years ago committed by GitHub
parent 4c243da019
commit 04cbed3989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      selfdrive/ui/qt/offroad/networking.cc

@ -6,6 +6,7 @@
#include <QLineEdit>
#include <QRandomGenerator>
#include <QtConcurrent>
#include <algorithm>
#include "common/params.h"
#include "networking.hpp"
@ -325,6 +326,8 @@ void WifiUI::refresh() {
int i = 0;
int countWidgets = 0;
int pageCount = (wifi->seen_networks.size() - 1) / networks_per_page;
page = std::max(0, std::min(page, pageCount));
for (Network &network : wifi->seen_networks) {
QHBoxLayout *hlayout = new QHBoxLayout;
if (page * networks_per_page <= i && i < (page + 1) * networks_per_page) {

Loading…
Cancel
Save