Feature #1440 ยป 0083-Qt-Unconditionally-assume-at-least-Qt-6.4.patch
client/gui-qt/chatline.cpp | ||
---|---|---|
if (color == "#00008B") {
|
||
color = bg_color.name();
|
||
} else {
|
||
#ifdef FC_QT6X_MODE
|
||
// Qt-6.4
|
||
qc = QColor::fromString(color);
|
||
#else // FC_QT6X_MODE
|
||
qc.setNamedColor(color);
|
||
#endif // FC_QT6X_MODE
|
||
qc = qc.lighter(200);
|
||
color = qc.name();
|
||
}
|
||
... | ... | |
}
|
||
if (text_tag_color_background(ptag)) {
|
||
color = text_tag_color_background(ptag);
|
||
if (
|
||
#ifdef FC_QT6X_MODE
|
||
// Qt-6.4
|
||
QColor::isValidColorName(color)
|
||
#else // FC_QT6X_MODE
|
||
QColor::isValidColor(color)
|
||
#endif // FC_QT6X_MODE
|
||
) {
|
||
if (QColor::isValidColorName(color)) {
|
||
str_col = QString("<span style= background-color:%1;>").arg(color);
|
||
mm.insert(stop, "</span>");
|
||
mm.insert(start, str_col);
|
client/gui-qt/optiondlg.cpp | ||
---|---|---|
if (button != nullptr && colorname != nullptr && colorname[0] != '\0') {
|
||
QString s1 = "QPushButton { background-color: ";
|
||
QString s2 = ";}";
|
||
QColor col;
|
||
#ifdef FC_QT6X_MODE
|
||
// Qt-6.4
|
||
col = QColor::fromString(colorname);
|
||
#else // FC_QT6X_MODE
|
||
col.setNamedColor(colorname);
|
||
#endif // FC_QT6X_MODE
|
||
QColor col = QColor::fromString(colorname);
|
||
button->setStyleSheet(s1 + col.name() + s2);
|
||
}
|
||
}
|
||
... | ... | |
button->setObjectName("text_color");
|
||
button->setAutoFillBackground(true);
|
||
button->setAutoDefault(false);
|
||
#ifdef FC_QT6X_MODE
|
||
// Qt-6.4
|
||
c = QColor::fromString(ft_color.foreground);
|
||
#else // FC_QT6X_MODE
|
||
c.setNamedColor(ft_color.foreground);
|
||
#endif // FC_QT6X_MODE
|
||
pal = button->palette();
|
||
pal.setColor(QPalette::Button, c);
|
||
button->setPalette(pal);
|
||
... | ... | |
button->setObjectName("text_background");
|
||
button->setAutoFillBackground(true);
|
||
button->setAutoDefault(false);
|
||
#ifdef FC_QT6X_MODE
|
||
// Qt-6.4
|
||
c = QColor::fromString(ft_color.background);
|
||
#else // FC_QT6X_MODE
|
||
c.setNamedColor(ft_color.background);
|
||
#endif // FC_QT6X_MODE
|
||
pal = button->palette();
|
||
pal.setColor(QPalette::Button, c);
|
||
button->setPalette(pal);
|