Revert "ui/wifi.cc: fix QPixmap leaks" (#30394)

Revert "ui/wifi.cc: fix QPixmap leaks (#30377)"

This reverts commit b4e1ad5e62.
pull/30398/head
Shane Smiskol 1 year ago committed by GitHub
parent b4e1ad5e62
commit d2c3c92fb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      selfdrive/ui/qt/widgets/wifi.cc

@ -18,8 +18,8 @@ WiFiPromptWidget::WiFiPromptWidget(QWidget *parent) : QFrame(parent) {
title_layout->setSpacing(32); title_layout->setSpacing(32);
{ {
QLabel *icon = new QLabel; QLabel *icon = new QLabel;
QPixmap pixmap("../assets/offroad/icon_wifi_strength_full.svg"); QPixmap *pixmap = new QPixmap("../assets/offroad/icon_wifi_strength_full.svg");
icon->setPixmap(pixmap.scaledToWidth(80, Qt::SmoothTransformation)); icon->setPixmap(pixmap->scaledToWidth(80, Qt::SmoothTransformation));
title_layout->addWidget(icon); title_layout->addWidget(icon);
QLabel *title = new QLabel(tr("Setup Wi-Fi")); QLabel *title = new QLabel(tr("Setup Wi-Fi"));
@ -68,8 +68,8 @@ WiFiPromptWidget::WiFiPromptWidget(QWidget *parent) : QFrame(parent) {
title_layout->addStretch(); title_layout->addStretch();
QLabel *icon = new QLabel; QLabel *icon = new QLabel;
QPixmap pixmap("../assets/offroad/icon_wifi_uploading.svg"); QPixmap *pixmap = new QPixmap("../assets/offroad/icon_wifi_uploading.svg");
icon->setPixmap(pixmap.scaledToWidth(120, Qt::SmoothTransformation)); icon->setPixmap(pixmap->scaledToWidth(120, Qt::SmoothTransformation));
title_layout->addWidget(icon); title_layout->addWidget(icon);
} }
uploading_layout->addLayout(title_layout); uploading_layout->addLayout(title_layout);

Loading…
Cancel
Save