  }
  
  // https://stackoverflow.com/questions/478898/how-do-i-execute-a-command-and-get-the-output-of-the-command-within-c-using-po
  std::string exec(const char* cmd) {
      std::array<char, 128> buffer;
      std::string result;
      std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
      if (!pipe) {
          throw std::runtime_error("popen() failed!");
      }
      while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
          result += buffer.data();
      }
      return result;
  }
  
  // Networking functions
  
  Networking::Networking(QWidget* parent) : QWidget(parent){
 
</s> remove Networking::Networking(QWidget* parent) : QWidget(parent){
 </s> add Networking::Networking(QWidget* parent, bool show_advanced) : QWidget(parent){ </s> remove   QObject::connect(parent, SIGNAL(sidebarPressed()), w, SLOT(sidebarChange()));
  QObject::connect(w, SIGNAL(openKeyboard()), parent, SLOT(closeSidebar()));
  QObject::connect(w, SIGNAL(closeKeyboard()), parent, SLOT(openSidebar()));
 </s> add  </s> remove   //Qt can be lazy
 </s> add   // Qt can be lazy </s> remove   if(s->currentIndex()==0){
    qDebug()<<"Wrong password, but we are already trying a new network";
    return;
  }
  if(s->currentIndex()==2){
    qDebug()<<"Wrong password, but we are in advanced settings";
    return;
  }
  if(!this->isVisible()){
    qDebug()<<"Wrong password, but we are not visible";
    return;

  }
 </s> add   return; // TODO: add this back
  /* </s> remove QWidget * Setup::network_setup() {

  QVBoxLayout *main_layout = new QVBoxLayout();
  main_layout->setContentsMargins(50, 50, 50, 50);

  main_layout->addWidget(title_label("Connect to WiFi"), 0, Qt::AlignTop);

  WifiUI *wifi = new WifiUI(this, 6);
  main_layout->addWidget(wifi);
  QObject::connect(wifi, &WifiUI::openKeyboard, this, [=]() {
    this->continue_btn->setVisible(false);
  });
  QObject::connect(wifi, &WifiUI::closeKeyboard, this, [=]() {
    this->continue_btn->setVisible(true);
  });

  continue_btn = new QPushButton("Continue");
  main_layout->addWidget(continue_btn);
  QObject::connect(continue_btn, SIGNAL(released()), this, SLOT(nextPage()));
 </s> add QWidget * Setup::getting_started() {
  QLabel *body = new QLabel("Before we get on the road, let's finish\ninstallation and cover some details.");
  body->setAlignment(Qt::AlignHCenter);
  body->setStyleSheet(R"(font-size: 80px;)");
  return build_page("Getting Started", body, true, false);
}
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  }
  
  // https://stackoverflow.com/questions/478898/how-do-i-execute-a-command-and-get-the-output-of-the-command-within-c-using-po
  std::string exec(const char* cmd) {
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  std::array<char, 128> buffer;
  std::string result;
  std::unique_ptr<FILE, decltype(&pclose)> pipe(popen(cmd, "r"), pclose);
  if (!pipe) {
    throw std::runtime_error("popen() failed!");
  }
  while (fgets(buffer.data(), buffer.size(), pipe.get()) != nullptr) {
    result += buffer.data();
  }
  return result;
  }
  
  // Networking functions
  
  Networking::Networking(QWidget* parent) : QWidget(parent){
keep keep keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Qt UI refactoring + improvements (#20033) 
selfdrive/ui/qt/offroad/networking.cc