void CardFrame::setCard(CardInfoPtr card) { if (info) { disconnect(info.data(), nullptr, this, nullptr); } info = std::move(card); if (info) { connect(info.data(), SIGNAL(destroyed()), this, SLOT(clearCard())); } text->setCard(info); pic->setCard(info); }
CardBase::~CardBase() { clearCard(); }
CardGeneral::~CardGeneral() { clearCard(); }
CardKing::~CardKing() { clearCard(); }