replace BackgroundColorRole/TextColorRole with BackgroundRole/ForegroundRole (qt6)

Since long time ago (12yrs), Qt::BackgroundColorRole/Qt::TextColorRole are aliased by Qt::BackgroundRole/Qt::ForegroundRole
and raise a deprecation warning.

Qt6 remove those values, thus we need to use Qt::BackgroundRole/Qt::ForegroundRole.
This commit is contained in:
Ludovic LANGE
2022-09-24 22:06:09 +02:00
parent a3bd67ea99
commit c2fc1f179e
+2 -2
View File
@@ -408,7 +408,7 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
const unsigned char *data = reinterpret_cast<const unsigned char *>(thisFrame.payload().constData());
int dataLen = thisFrame.payload().count();
if (role == Qt::BackgroundColorRole)
if (role == Qt::BackgroundRole)
{
if (dbcHandler != nullptr && interpretFrames && !ignoreDBCColors)
{
@@ -441,7 +441,7 @@ QVariant CANFrameModel::data(const QModelIndex &index, int role) const
}
}
if (role == Qt::TextColorRole)
if (role == Qt::ForegroundRole)
{
if (dbcHandler != nullptr && interpretFrames && !ignoreDBCColors)
{