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:
ctrlaltca 2018-02-02 18:52:47 +01:00 committed by Zach H
parent 3e418ba3c6
commit 517420cccb
37 changed files with 409 additions and 342 deletions

View file

@ -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();