diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-07-23 15:26:19 +0200 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2019-08-01 17:04:13 +0000 |
commit | 376715f1a57209cbb19502954a37939e2d6d88c6 (patch) | |
tree | 83786e4d39be7ce6f6ce3897d8fad8aab899b9f6 /src/widgets/itemviews/qlistwidget.cpp | |
parent | bd2c8353b44a1e63b84852ec9adeed78dbfab312 (diff) |
Remove usages of deprecated APIs of qtbase/widgets
- Replace the usages of deprecated APIs by corresponding
alternatives in the library code and documentation.
- Build docs for deprecated APIs conditionally, based on deprecation
version. Remove the docs of methods deprecated since 5.0.0, these
methods are not compiled anymore.
- Modify the tests to make them build when deprecated APIs disabled:
* Make the the parts of the tests testing the deprecated APIs to
be compiled conditionally, only when the corresponding methods
are enabled.
* If the test-case tests only the deprecated API, but not the
corresponding replacement, add tests for the replacement
Task-number: QTBUG-76491
Task-number: QTBUG-76540
Task-number: QTBUG-76541
Change-Id: I6aaf0a1369c479fb880369a38f2b8e1e86b46934
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/itemviews/qlistwidget.cpp')
-rw-r--r-- | src/widgets/itemviews/qlistwidget.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/widgets/itemviews/qlistwidget.cpp b/src/widgets/itemviews/qlistwidget.cpp index 37bb370e73..e7dcfac403 100644 --- a/src/widgets/itemviews/qlistwidget.cpp +++ b/src/widgets/itemviews/qlistwidget.cpp @@ -930,12 +930,14 @@ QDataStream &operator>>(QDataStream &in, QListWidgetItem &item) \sa Qt::AlignmentFlag */ +#if QT_DEPRECATED_SINCE(5, 13) /*! \fn QColor QListWidgetItem::backgroundColor() const \obsolete This function is deprecated. Use background() instead. */ +#endif /*! \fn QBrush QListWidgetItem::background() const @@ -946,6 +948,7 @@ QDataStream &operator>>(QDataStream &in, QListWidgetItem &item) \sa setBackground(), foreground() */ +#if QT_DEPRECATED_SINCE(5, 13) /*! \fn QColor QListWidgetItem::textColor() const \obsolete @@ -954,6 +957,7 @@ QDataStream &operator>>(QDataStream &in, QListWidgetItem &item) This function is deprecated. Use foreground() instead. */ +#endif /*! \fn QBrush QListWidgetItem::foreground() const @@ -1119,12 +1123,14 @@ void QListWidgetItem::setFlags(Qt::ItemFlags aflags) \sa background(), setForeground() */ +#if QT_DEPRECATED_SINCE(5, 13) /*! \fn void QListWidgetItem::setTextColor(const QColor &color) \obsolete This function is deprecated. Use setForeground() instead. */ +#endif /*! \fn void QListWidgetItem::setForeground(const QBrush &brush) |