From d0b0756cbf8122d6964608afb9bc49ce7be41851 Mon Sep 17 00:00:00 2001 From: Noah Date: Wed, 23 Feb 2022 16:21:27 +0100 Subject: [PATCH] Gui: fix use of deprecated Qt::TextColorRole Qt::TextColorRole (enum ItemDataRole) is deprecated as of Qt 5.13 and will be removed in Qt 6: - https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qnamespace.h?h=v5.13.0#n1511 It's replaced with `Qt::ForegroundRole` which is available since at least Qt 5.0 (FreeCAD 0.20 will require Qt 5.9 or later). - https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/global/qnamespace.h?h=v5.0.0#n1374 - https://wiki.freecadweb.org/0.20_Development_Cycle --- src/Gui/propertyeditor/PropertyItem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 5c2c217728..cc94b43b54 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -573,10 +573,10 @@ QVariant PropertyItem::data(int column, int role) const { // property name if (column == 0) { - if (role == Qt::TextColorRole && linked) + if (role == Qt::ForegroundRole && linked) return QVariant::fromValue(QColor(0x20,0xaa,0x20)); - if (role == Qt::BackgroundRole || role == Qt::TextColorRole) { + if (role == Qt::BackgroundRole || role == Qt::ForegroundRole) { if(PropertyView::showAll() && propertyItems.size() == 1 && propertyItems.front()->testStatus(App::Property::PropDynamic)