mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
update deprecated methods in qt5.14 and protobuf 3.4 (#3906)
This commit is contained in:
parent
361833e023
commit
a80c756dcb
11 changed files with 74 additions and 37 deletions
|
|
@ -153,7 +153,7 @@ void TableZone::handleDropEventByGrid(const QList<CardDragItem *> &dragItems,
|
|||
|
||||
void TableZone::reorganizeCards()
|
||||
{
|
||||
QList<ArrowItem *> arrowsToUpdate;
|
||||
QSet<ArrowItem *> arrowsToUpdate;
|
||||
|
||||
// Calculate card stack widths so mapping functions work properly
|
||||
computeCardStackWidths();
|
||||
|
|
@ -185,18 +185,24 @@ void TableZone::reorganizeCards()
|
|||
qreal childY = y + 5;
|
||||
attachedCard->setPos(childX, childY);
|
||||
attachedCard->setRealZValue((childY + CARD_HEIGHT) * 100000 + (childX + 1) * 100);
|
||||
|
||||
arrowsToUpdate.append(attachedCard->getArrowsFrom());
|
||||
arrowsToUpdate.append(attachedCard->getArrowsTo());
|
||||
for (ArrowItem *item : attachedCard->getArrowsFrom()) {
|
||||
arrowsToUpdate.insert(item);
|
||||
}
|
||||
for (ArrowItem *item : attachedCard->getArrowsTo()) {
|
||||
arrowsToUpdate.insert(item);
|
||||
}
|
||||
}
|
||||
|
||||
arrowsToUpdate.append(cards[i]->getArrowsFrom());
|
||||
arrowsToUpdate.append(cards[i]->getArrowsTo());
|
||||
for (ArrowItem *item : cards[i]->getArrowsFrom()) {
|
||||
arrowsToUpdate.insert(item);
|
||||
}
|
||||
for (ArrowItem *item : cards[i]->getArrowsTo()) {
|
||||
arrowsToUpdate.insert(item);
|
||||
}
|
||||
}
|
||||
for (ArrowItem *item : arrowsToUpdate) {
|
||||
item->updatePath();
|
||||
}
|
||||
|
||||
QSetIterator<ArrowItem *> arrowIterator(QSet<ArrowItem *>::fromList(arrowsToUpdate));
|
||||
while (arrowIterator.hasNext())
|
||||
arrowIterator.next()->updatePath();
|
||||
|
||||
resizeToContents();
|
||||
update();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue