added deck hashing

This commit is contained in:
unknown 2011-10-04 16:55:18 +02:00
parent 963e8f0d90
commit 0bb4ef8bb8
31 changed files with 4867 additions and 4831 deletions

View file

@ -17,6 +17,7 @@ DeckListModel::DeckListModel(QObject *parent)
{
deckList = new DeckList;
connect(deckList, SIGNAL(deckLoaded()), this, SLOT(rebuildTree()));
connect(deckList, SIGNAL(deckHashChanged()), this, SIGNAL(deckHashChanged()));
root = new InnerDecklistNode;
}
@ -194,6 +195,7 @@ bool DeckListModel::setData(const QModelIndex &index, const QVariant &value, int
default: return false;
}
emitRecursiveUpdates(index);
deckList->updateDeckHash();
return true;
}
@ -310,6 +312,8 @@ void DeckListModel::setDeckList(DeckList *_deck)
{
delete deckList;
deckList = _deck;
connect(deckList, SIGNAL(deckLoaded()), this, SLOT(rebuildTree()));
connect(deckList, SIGNAL(deckHashChanged()), this, SIGNAL(deckHashChanged()));
rebuildTree();
}