Skip to content

Commit

Permalink
ui/wifi.cc: fix small QPixmap leak (commaai#30395)
Browse files Browse the repository at this point in the history
fix QPixmap leaks
  • Loading branch information
deanlee authored Nov 7, 2023
1 parent 37ba6d8 commit 0f6b16d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions selfdrive/ui/qt/widgets/wifi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ WiFiPromptWidget::WiFiPromptWidget(QWidget *parent) : QFrame(parent) {
title_layout->setSpacing(32);
{
QLabel *icon = new QLabel;
QPixmap *pixmap = new QPixmap("../assets/offroad/icon_wifi_strength_full.svg");
icon->setPixmap(pixmap->scaledToWidth(80, Qt::SmoothTransformation));
QPixmap pixmap("../assets/offroad/icon_wifi_strength_full.svg");
icon->setPixmap(pixmap.scaledToWidth(80, Qt::SmoothTransformation));
title_layout->addWidget(icon);

QLabel *title = new QLabel(tr("Setup Wi-Fi"));
Expand Down Expand Up @@ -68,8 +68,8 @@ WiFiPromptWidget::WiFiPromptWidget(QWidget *parent) : QFrame(parent) {
title_layout->addStretch();

QLabel *icon = new QLabel;
QPixmap *pixmap = new QPixmap("../assets/offroad/icon_wifi_uploading.svg");
icon->setPixmap(pixmap->scaledToWidth(120, Qt::SmoothTransformation));
QPixmap pixmap("../assets/offroad/icon_wifi_uploading.svg");
icon->setPixmap(pixmap.scaledToWidth(120, Qt::SmoothTransformation));
title_layout->addWidget(icon);
}
uploading_layout->addLayout(title_layout);
Expand Down

0 comments on commit 0f6b16d

Please sign in to comment.