mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
ui/wifi.cc: fix QPixmap leaks (#30377)
fix QPixmap leaks
old-commit-hash: b4e1ad5e62
This commit is contained in:
@@ -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"));
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user