mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-15 03:28:49 -07:00
Replace CardInfo* and Carset* with smart pointers (#3053)
* Replace CardInfo* and Carset* with smart pointers * fixes to help memory & c++11 stuff
This commit is contained in:
parent
3e418ba3c6
commit
517420cccb
37 changed files with 409 additions and 342 deletions
|
|
@ -46,7 +46,7 @@ void AbstractCardItem::cardInfoUpdated()
|
|||
{
|
||||
info = db->getCard(name);
|
||||
if (info)
|
||||
connect(info, SIGNAL(pixmapUpdated()), this, SLOT(pixmapUpdated()));
|
||||
connect(info.data(), SIGNAL(pixmapUpdated()), this, SLOT(pixmapUpdated()));
|
||||
|
||||
cacheBgColor();
|
||||
update();
|
||||
|
|
@ -182,7 +182,7 @@ void AbstractCardItem::setName(const QString &_name)
|
|||
|
||||
emit deleteCardInfoPopup(name);
|
||||
if (info)
|
||||
disconnect(info, nullptr, this, nullptr);
|
||||
disconnect(info.data(), nullptr, this, nullptr);
|
||||
name = _name;
|
||||
|
||||
cardInfoUpdated();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue