Project

General

Profile

Bug #1176 ยป 0047-Qt-Fix-Qt5-mode-compile-with-gcc-15.patch

Marko Lindqvist, 12/07/2024 09:04 AM

View differences:

client/gui-qt/sprite.cpp
u8"\u24F4"
};
#ifdef FC_QT5_MODE
ns = QString((const char *)numsbuf[num]);
}
w = fm.horizontalAdvance(ns);
h = fm.height();
pm = new QPixmap(w, h);
pm->fill(Qt::transparent);
QPainter paint(pm);
paint.setFont(*qf);
paint.setBrush(Qt::transparent);
paint.setPen(QColor(Qt::black));
paint.drawText(QRect(0, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
QString((const char *)u8"\u26AB"));
if (num > 20) {
paint.setPen(QColor(Qt::yellow));
paint.drawText(QRect(-2, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
QString((const char *)u8"\u2B24"));
paint.drawText(QRect(4, -2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
QString((const char *)u8"\u2B24"));
paint.drawText(QRect(4, 2, w, h), Qt::AlignLeft | Qt::AlignVCenter,
QString((const char *)u8"\u2B24"));
paint.drawText(QRect(8, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
QString((const char *)u8"\u2B24"));
}
#else // FC_QT5_MODE
ns = QString(numsbuf[num]);
}
......
pm->fill(Qt::transparent);
QPainter paint(pm);
paint.setFont(*qf);
paint.setBrush(Qt::transparent);
paint.setPen(QColor(Qt::black));
......
paint.drawText(QRect(8, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter,
QString(u8"\u2B24"));
}
#endif // FC_QT5_MODE
paint.setPen(QColor((num > 20) ? Qt::black : Qt::yellow));
paint.drawText(QRect(0, 0, w, h), Qt::AlignLeft | Qt::AlignVCenter, ns);
paint.end();
    (1-1/1)