mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 00:12:15 -07:00
Connect to QObject instead of emitting own signal.
Took 12 minutes Took 7 minutes
This commit is contained in:
parent
578c650936
commit
7a9d3f8e77
2 changed files with 1 additions and 9 deletions
|
|
@ -40,8 +40,7 @@ CardInfoPictureWidget::CardInfoPictureWidget(QWidget *parent, const bool _hoverT
|
|||
|
||||
enlargedPixmapWidget = new CardInfoPictureEnlargedWidget(this->window());
|
||||
enlargedPixmapWidget->hide();
|
||||
connect(this, &CardInfoPictureWidget::deleteEnlargedPixmapWidget, enlargedPixmapWidget,
|
||||
&CardInfoPictureEnlargedWidget::deleteLater);
|
||||
connect(this, &QObject::destroyed, enlargedPixmapWidget, &CardInfoPictureEnlargedWidget::deleteLater);
|
||||
|
||||
hoverTimer = new QTimer(this);
|
||||
hoverTimer->setSingleShot(true);
|
||||
|
|
@ -65,11 +64,6 @@ CardInfoPictureWidget::CardInfoPictureWidget(QWidget *parent, const bool _hoverT
|
|||
});
|
||||
}
|
||||
|
||||
CardInfoPictureWidget::~CardInfoPictureWidget()
|
||||
{
|
||||
emit deleteEnlargedPixmapWidget();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Sets the card to be displayed and updates the pixmap.
|
||||
* @param card A shared pointer to the card information (CardInfoPtr).
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ public:
|
|||
explicit CardInfoPictureWidget(QWidget *parent = nullptr,
|
||||
bool hoverToZoomEnabled = false,
|
||||
bool raiseOnEnter = false);
|
||||
~CardInfoPictureWidget();
|
||||
ExactCard getCard()
|
||||
{
|
||||
return exactCard;
|
||||
|
|
@ -40,7 +39,6 @@ signals:
|
|||
void cardScaleFactorChanged(int _scale);
|
||||
void cardChanged(const ExactCard &card);
|
||||
void cardClicked();
|
||||
void deleteEnlargedPixmapWidget();
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue