mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -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
|
|
@ -73,7 +73,7 @@ void StackZone::handleDropEvent(const QList<CardDragItem *> &dragItems,
|
|||
void StackZone::reorganizeCards()
|
||||
{
|
||||
if (!cards.isEmpty()) {
|
||||
QList<ArrowItem *> arrowsToUpdate;
|
||||
QSet<ArrowItem *> arrowsToUpdate;
|
||||
|
||||
const int cardCount = cards.size();
|
||||
qreal totalWidth = boundingRect().width();
|
||||
|
|
@ -95,12 +95,16 @@ void StackZone::reorganizeCards()
|
|||
c->setPos(x, ((qreal)i) * cardHeight + (totalHeight - cardCount * cardHeight) / 2);
|
||||
c->setRealZValue(i);
|
||||
|
||||
arrowsToUpdate.append(c->getArrowsFrom());
|
||||
arrowsToUpdate.append(c->getArrowsTo());
|
||||
for (ArrowItem *item : c->getArrowsFrom()) {
|
||||
arrowsToUpdate.insert(item);
|
||||
}
|
||||
for (ArrowItem *item : c->getArrowsTo()) {
|
||||
arrowsToUpdate.insert(item);
|
||||
}
|
||||
}
|
||||
for (ArrowItem *item : arrowsToUpdate) {
|
||||
item->updatePath();
|
||||
}
|
||||
QSetIterator<ArrowItem *> arrowIterator(QSet<ArrowItem *>::fromList(arrowsToUpdate));
|
||||
while (arrowIterator.hasNext())
|
||||
arrowIterator.next()->updatePath();
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue