]> git.lyx.org Git - features.git/commit
Fix Qt deprecation warns for setTextColor()
authorScott Kostyshak <skostysh@lyx.org>
Thu, 19 Mar 2020 14:16:19 +0000 (10:16 -0400)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:54 +0000 (15:48 +0200)
commitd0245c2bcdea208b855bcce5bb80dbe08ebc3e37
tree02a8357a8d1638c996322bf26c7f3c7b4d1d4ef1
parent0c56004a0f883426ebfc36c19fc49e85ae93da22
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
src/frontends/qt/PanelStack.cpp