diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-10-18 20:56:06 +0200 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2018-10-21 06:43:43 +0000 |
commit | 54e74c515c74e3e0bc0c147e69a45cbe34bcb8e0 (patch) | |
tree | 57c289cc5b421bd29b1b817ccc11b6bcc33e6a0d /src/widgets/itemviews/qlistwidget.h | |
parent | 64f6169f61ce8c982a1b92b20f930518a5f0d477 (diff) |
Itemviews: mark some functions as deprecated
Mark some long deprecated functions as deprecated so they can be removed
with Qt6.
Change-Id: I2ccd21c829c954b6a3662799070682dbe71fd693
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Diffstat (limited to 'src/widgets/itemviews/qlistwidget.h')
-rw-r--r-- | src/widgets/itemviews/qlistwidget.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/widgets/itemviews/qlistwidget.h b/src/widgets/itemviews/qlistwidget.h index 947fdb1a2f..d3b27d201a 100644 --- a/src/widgets/itemviews/qlistwidget.h +++ b/src/widgets/itemviews/qlistwidget.h @@ -114,20 +114,28 @@ public: inline void setTextAlignment(int alignment) { setData(Qt::TextAlignmentRole, alignment); } +#if QT_DEPRECATED_SINCE(5, 13) + QT_DEPRECATED_X ("Use QListWidgetItem::background() instead") inline QColor backgroundColor() const - { return qvariant_cast<QColor>(data(Qt::BackgroundColorRole)); } + { return qvariant_cast<QColor>(data(Qt::BackgroundRole)); } + QT_DEPRECATED_X ("Use QListWidgetItem::setBackground() instead") virtual 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 QListWidgetItem::foreground() instead") inline QColor textColor() const - { return qvariant_cast<QColor>(data(Qt::TextColorRole)); } + { return qvariant_cast<QColor>(data(Qt::ForegroundRole)); } + QT_DEPRECATED_X ("Use QListWidgetItem::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)); } |