diff options
Diffstat (limited to 'src/widgets/itemviews/qtablewidget.h')
-rw-r--r-- | src/widgets/itemviews/qtablewidget.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/widgets/itemviews/qtablewidget.h b/src/widgets/itemviews/qtablewidget.h index 9de27d164f..be629264f8 100644 --- a/src/widgets/itemviews/qtablewidget.h +++ b/src/widgets/itemviews/qtablewidget.h @@ -131,20 +131,28 @@ public: inline void setTextAlignment(int alignment) { setData(Qt::TextAlignmentRole, alignment); } +#if QT_DEPRECATED_SINCE(5, 13) + QT_DEPRECATED_X ("Use QTableWidgetItem::background() instead") inline QColor backgroundColor() const - { return qvariant_cast<QColor>(data(Qt::BackgroundColorRole)); } + { return qvariant_cast<QColor>(data(Qt::BackgroundRole)); } + QT_DEPRECATED_X ("Use QTableWidgetItem::setBackground() instead") inline void setBackgroundColor(const QColor &color) - { setData(Qt::BackgroundColorRole, color); } + { setData(Qt::BackgroundRole, color); } +#endif inline QBrush background() const { return qvariant_cast<QBrush>(data(Qt::BackgroundRole)); } inline void setBackground(const QBrush &brush) { setData(Qt::BackgroundRole, brush); } +#if QT_DEPRECATED_SINCE(5, 13) + QT_DEPRECATED_X ("Use QTableWidgetItem::foreground() instead") inline QColor textColor() const - { return qvariant_cast<QColor>(data(Qt::TextColorRole)); } + { return qvariant_cast<QColor>(data(Qt::ForegroundRole)); } + QT_DEPRECATED_X ("Use QTableWidgetItem::setForeground() instead") inline void setTextColor(const QColor &color) - { setData(Qt::TextColorRole, color); } + { setData(Qt::ForegroundRole, color); } +#endif inline QBrush foreground() const { return qvariant_cast<QBrush>(data(Qt::ForegroundRole)); } |