Don't use Qt pointers.

Took 1 hour 7 minutes
This commit is contained in:
Lukas Brübach 2025-11-07 13:23:46 +01:00
parent 930e4ae98d
commit fc6ffffcb9
125 changed files with 764 additions and 813 deletions

View file

@ -73,12 +73,11 @@ DeckViewCard::DeckViewCard(QGraphicsItem *parent, const CardRef &cardRef, const
{
setAcceptHoverEvents(true);
connect(SettingsCache::instance().get(), &SettingsCache::roundCardCornersChanged, this,
[this](bool _roundCardCorners) {
Q_UNUSED(_roundCardCorners);
connect(&SettingsCache::instance(), &SettingsCache::roundCardCornersChanged, this, [this](bool _roundCardCorners) {
Q_UNUSED(_roundCardCorners);
update();
});
update();
});
}
DeckViewCard::~DeckViewCard()
@ -96,7 +95,7 @@ void DeckViewCard::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti
pen.setJoinStyle(Qt::MiterJoin);
pen.setColor(originZone == DECK_ZONE_MAIN ? Qt::green : Qt::red);
painter->setPen(pen);
qreal cardRadius = SettingsCache::instance()->getRoundCardCorners() ? 0.05 * (CARD_WIDTH - 3) : 0.0;
qreal cardRadius = SettingsCache::instance().getRoundCardCorners() ? 0.05 * (CARD_WIDTH - 3) : 0.0;
painter->drawRoundedRect(QRectF(1.5, 1.5, CARD_WIDTH - 3., CARD_HEIGHT - 3.), cardRadius, cardRadius);
painter->restore();
}