Project

General

Profile

Bug #737 ยป 0007-Qt-Avoid-deprecated-QFontDatabase-constructor-in-Qt6.patch

Marko Lindqvist, 06/28/2024 06:00 PM

View differences:

client/gui-qt/fonts.cpp
QString configure_font(QString font_name, QStringList sl, int size,
bool bold)
{
#ifdef FC_QT5_MODE
QFontDatabase database;
#endif
QString str;
QFont *f;
QString style;
......
}
foreach (str, sl) {
#ifndef FC_QT5_MODE
QList<int> sizes = QFontDatabase::smoothSizes(str, style);
#else // FC_QT5_MODE
QList<int> sizes = database.smoothSizes(str, style);
#endif // FC_QT5_MODE
if (!sizes.isEmpty()) {
QListIterator<int> i(sizes);
    (1-1/1)