Properly delete enlargedPixmapWidget (#6131)

* Properly delete enlargedPixmapWidget.

Took 23 minutes

Took 13 seconds


Took 16 seconds

* Connect to QObject instead of emitting own signal.

Took 12 minutes

Took 7 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL
2025-09-13 13:35:59 +02:00
committed by GitHub
parent 2490e97ea0
commit 87b0259b97
2 changed files with 1 additions and 9 deletions

View File

@@ -40,6 +40,7 @@ CardInfoPictureWidget::CardInfoPictureWidget(QWidget *parent, const bool _hoverT
enlargedPixmapWidget = new CardInfoPictureEnlargedWidget(this->window());
enlargedPixmapWidget->hide();
connect(this, &QObject::destroyed, enlargedPixmapWidget, &CardInfoPictureEnlargedWidget::deleteLater);
hoverTimer = new QTimer(this);
hoverTimer->setSingleShot(true);
@@ -63,14 +64,6 @@ CardInfoPictureWidget::CardInfoPictureWidget(QWidget *parent, const bool _hoverT
});
}
CardInfoPictureWidget::~CardInfoPictureWidget()
{
if (enlargedPixmapWidget) {
enlargedPixmapWidget->hide();
enlargedPixmapWidget->deleteLater();
}
}
/**
* @brief Sets the card to be displayed and updates the pixmap.
* @param card A shared pointer to the card information (CardInfoPtr).

View File

@@ -21,7 +21,6 @@ public:
explicit CardInfoPictureWidget(QWidget *parent = nullptr,
bool hoverToZoomEnabled = false,
bool raiseOnEnter = false);
~CardInfoPictureWidget();
ExactCard getCard()
{
return exactCard;