mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Fix Qt deprecation warns for setTextColor()
This commit fixes the following warning from Qt 5.14: error: ‘void QTreeWidgetItem::setTextColor(int, const QColor&)’ is deprecated: Use QTreeWidgetItem::setForeground() instead [-Werror=deprecated-declarations] setForeground was introduced in Qt 4.2 [1]. We have a couple of commented out uses of a setTextColor() method in GuiDocument.cpp, but the QTextEdit::setTextColor() is not deprecated so no change is needed. [1] https://doc.qt.io/archives/qt-4.8/qtreewidgetitem.html#setForeground
This commit is contained in:
parent
1d015ee9f3
commit
8583410617
@ -212,7 +212,7 @@ static void setTreeItemStatus(QTreeWidgetItem * tree_item, bool enabled)
|
|||||||
// Change the color from black to gray or viceversa
|
// Change the color from black to gray or viceversa
|
||||||
QPalette::ColorGroup new_color =
|
QPalette::ColorGroup new_color =
|
||||||
enabled ? QPalette::Active : QPalette::Disabled;
|
enabled ? QPalette::Active : QPalette::Disabled;
|
||||||
tree_item->setTextColor(0, QApplication::palette().color(new_color,
|
tree_item->setForeground(0, QApplication::palette().color(new_color,
|
||||||
QPalette::Text));
|
QPalette::Text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user