From 376715f1a57209cbb19502954a37939e2d6d88c6 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Tue, 23 Jul 2019 15:26:19 +0200 Subject: 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 --- src/widgets/itemviews/qtreewidget.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/widgets/itemviews/qtreewidget.cpp') diff --git a/src/widgets/itemviews/qtreewidget.cpp b/src/widgets/itemviews/qtreewidget.cpp index d2dc91b18c..d285ad6d28 100644 --- a/src/widgets/itemviews/qtreewidget.cpp +++ b/src/widgets/itemviews/qtreewidget.cpp @@ -1251,6 +1251,7 @@ bool QTreeWidgetItem::isFirstColumnSpanned() const \sa font(), setText(), setForeground() */ +#if QT_DEPRECATED_SINCE(5, 13) /*! \fn QColor QTreeWidgetItem::backgroundColor(int column) const \obsolete @@ -1264,6 +1265,7 @@ bool QTreeWidgetItem::isFirstColumnSpanned() const This function is deprecated. Use setBackground() instead. */ +#endif /*! \fn QBrush QTreeWidgetItem::background(int column) const @@ -1284,6 +1286,7 @@ bool QTreeWidgetItem::isFirstColumnSpanned() const \sa setForeground() */ +#if QT_DEPRECATED_SINCE(5, 13) /*! \fn QColor QTreeWidgetItem::textColor(int column) const \obsolete @@ -1297,6 +1300,7 @@ bool QTreeWidgetItem::isFirstColumnSpanned() const This function is deprecated. Use setForeground() instead. */ +#endif /*! \fn QBrush QTreeWidgetItem::foreground(int column) const -- cgit v1.2.3