diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-03-27 18:45:10 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2019-03-31 12:25:32 +0000 |
commit | ed49a84e6caa8c76f2edd382a4405028d07a9fba (patch) | |
tree | 04f1161dce2e08cd65ddea926bde929227eacfd5 /src/widgets | |
parent | 0a7302abbc47a0db25f119ee4f5144bbaf0d9d6f (diff) |
QListWidget: don't hide setBackgroundColor with QT_DISABLE_DEPRECATED_SINCE
QListWidget::setBackgroundColor() is a virtual function. Hiding this
function when compiling/linking against QtWidgets when
QT_DISABLE_DEPRECATED_SINCE is set will therefore screw up the vtable
and it will crash on runtime.
Therefore don't surround them with QT_DEPRECATED_SINCE macro.
Fixes: QTBUG-74665
Change-Id: Icb0f253117a1e55a338d2d6969ec2d59fbd0679d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/itemviews/qlistwidget.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qlistwidget.h b/src/widgets/itemviews/qlistwidget.h index c093d13e6d..c102b144df 100644 --- a/src/widgets/itemviews/qlistwidget.h +++ b/src/widgets/itemviews/qlistwidget.h @@ -118,10 +118,11 @@ public: QT_DEPRECATED_X ("Use QListWidgetItem::background() instead") inline QColor backgroundColor() const { return qvariant_cast<QColor>(data(Qt::BackgroundRole)); } +#endif + // no QT_DEPRECATED_SINCE because it is a virtual function QT_DEPRECATED_X ("Use QListWidgetItem::setBackground() instead") virtual void setBackgroundColor(const QColor &color) { setData(Qt::BackgroundRole, color); } -#endif inline QBrush background() const { return qvariant_cast<QBrush>(data(Qt::BackgroundRole)); } |