mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-21 01:42:15 -07:00
don't emit signals in dtors
This commit is contained in:
parent
48414986f8
commit
b4d7b2cd22
8 changed files with 34 additions and 45 deletions
|
|
@ -358,7 +358,7 @@ void TabDeckEditor::createMenus()
|
|||
analyzeDeckMenu->addAction(aAnalyzeDeckTappedout);
|
||||
|
||||
aClose = new QAction(QString(), this);
|
||||
connect(aClose, SIGNAL(triggered()), this, SLOT(closeRequest()));
|
||||
connect(aClose, &QAction::triggered, this, [this](bool) { closeRequest(); });
|
||||
|
||||
aClearFilterAll = new QAction(QString(), this);
|
||||
aClearFilterAll->setIcon(QPixmap("theme:icons/clearsearch"));
|
||||
|
|
@ -721,11 +721,6 @@ TabDeckEditor::TabDeckEditor(TabSupervisor *_tabSupervisor, QWidget *parent)
|
|||
loadLayout();
|
||||
}
|
||||
|
||||
TabDeckEditor::~TabDeckEditor()
|
||||
{
|
||||
emit deckEditorClosing(this);
|
||||
}
|
||||
|
||||
void TabDeckEditor::retranslateUi()
|
||||
{
|
||||
cardInfo->retranslateUi();
|
||||
|
|
@ -982,8 +977,12 @@ bool TabDeckEditor::confirmClose()
|
|||
|
||||
void TabDeckEditor::closeRequest(bool forced)
|
||||
{
|
||||
if (confirmClose())
|
||||
deleteLater();
|
||||
if (!forced && !confirmClose()) {
|
||||
return;
|
||||
}
|
||||
|
||||
emit deckEditorClosing(this);
|
||||
deleteLater();
|
||||
}
|
||||
|
||||
void TabDeckEditor::actNewDeck()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue