mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Ported cockatrice
This commit is contained in:
parent
bab340f7b7
commit
6dbdaafb33
22 changed files with 181 additions and 16 deletions
|
|
@ -68,6 +68,10 @@ QVariant CardDatabaseModel::headerData(int section, Qt::Orientation orientation,
|
|||
|
||||
void CardDatabaseModel::updateCardList()
|
||||
{
|
||||
#if QT_VERSION >= 0x050000
|
||||
beginResetModel();
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < cardList.size(); ++i)
|
||||
disconnect(cardList[i], 0, this, 0);
|
||||
|
||||
|
|
@ -75,7 +79,11 @@ void CardDatabaseModel::updateCardList()
|
|||
for (int i = 0; i < cardList.size(); ++i)
|
||||
connect(cardList[i], SIGNAL(cardInfoChanged(CardInfo *)), this, SLOT(cardInfoChanged(CardInfo *)));
|
||||
|
||||
#if QT_VERSION < 0x050000
|
||||
reset();
|
||||
#else
|
||||
endResetModel();
|
||||
#endif
|
||||
}
|
||||
|
||||
void CardDatabaseModel::cardInfoChanged(CardInfo *card)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue