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/qheaderview.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/qheaderview.cpp')
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 80 |
1 files changed, 5 insertions, 75 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index be80843b07..c4766a74bd 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -189,7 +189,7 @@ static const int maxSizeSection = 1048575; // since section size is in a bitfiel The following values are obsolete: \value Custom Use Fixed instead. - \sa setResizeMode(), setSectionResizeMode(), stretchLastSection, minimumSectionSize + \sa setSectionResizeMode(), stretchLastSection, minimumSectionSize */ /*! @@ -880,7 +880,7 @@ void QHeaderView::swapSections(int first, int second) size equal to zero is however not recommended. In that situation hideSection should be used instead. - \sa sectionResized(), resizeMode(), sectionSize(), hideSection() + \sa sectionResized(), sectionSize(), hideSection() */ void QHeaderView::resizeSection(int logical, int size) @@ -960,7 +960,7 @@ void QHeaderView::resizeSection(int logical, int size) Resizes the sections according to the given \a mode, ignoring the current resize mode. - \sa resizeMode(), sectionResized() + \sa sectionResized() */ void QHeaderView::resizeSections(QHeaderView::ResizeMode mode) @@ -1139,16 +1139,6 @@ void QHeaderView::setSectionsMovable(bool movable) d->movableSections = movable; } -// ### Qt 6 - remove this obsolete function -/*! - \obsolete - \fn void QHeaderView::setMovable(bool movable) - - Use setSectionsMovable instead. - - \sa setSectionsMovable() -*/ - /*! \since 5.0 @@ -1167,16 +1157,6 @@ bool QHeaderView::sectionsMovable() const return d->movableSections; } -// ### Qt 6 - remove this obsolete function -/*! - \obsolete - \fn bool QHeaderView::isMovable() const - - Use sectionsMovable instead. - - \sa sectionsMovable() -*/ - /*! \property QHeaderView::firstSectionMovable \brief Whether the first column can be moved by the user @@ -1223,16 +1203,6 @@ void QHeaderView::setSectionsClickable(bool clickable) d->clickableSections = clickable; } -// ### Qt 6 - remove this obsolete function -/*! - \obsolete - \fn void QHeaderView::setClickable(bool clickable) - - Use setSectionsClickable instead. - - \sa setSectionsClickable() -*/ - /*! \since 5.0 @@ -1249,16 +1219,6 @@ bool QHeaderView::sectionsClickable() const return d->clickableSections; } -// ### Qt 6 - remove this obsolete function -/*! - \obsolete - \fn bool QHeaderView::isClickable() const - - Use sectionsClickable instead. - - \sa sectionsClickable() -*/ - void QHeaderView::setHighlightSections(bool highlight) { Q_D(QHeaderView); @@ -1277,7 +1237,7 @@ bool QHeaderView::highlightSections() const Sets the constraints on how the header can be resized to those described by the given \a mode. - \sa resizeMode(), length(), sectionResized() + \sa length(), sectionResized() */ void QHeaderView::setSectionResizeMode(ResizeMode mode) @@ -1327,26 +1287,6 @@ void QHeaderView::setSectionResizeMode(int logicalIndex, ResizeMode mode) d->doDelayedResizeSections(); // section sizes may change as a result of the new mode } -// ### Qt 6 - remove this obsolete function -/*! - \overload - \obsolete - \fn void QHeaderView::setResizeMode(int logicalIndex, ResizeMode mode) - - Use setSectionResizeMode instead. - - \sa setSectionResizeMode() -*/ - -/*! - \obsolete - \fn void QHeaderView::setResizeMode(ResizeMode mode) - - Use setSectionResizeMode instead. - - \sa setSectionResizeMode() -*/ - /*! \since 5.0 @@ -1407,16 +1347,6 @@ int QHeaderView::resizeContentsPrecision() const return d->resizeContentsPrecision; } -// ### Qt 6 - remove this obsolete function -/*! - \obsolete - \fn QHeaderView::ResizeMode QHeaderView::resizeMode(int logicalIndex) const - - Use sectionResizeMode instead. - - \sa sectionResizeMode() -*/ - /*! \since 4.1 @@ -1424,7 +1354,7 @@ int QHeaderView::resizeContentsPrecision() const views, this can be used to see if the headerview needs to resize the sections when the view's geometry changes. - \sa stretchLastSection, resizeMode() + \sa stretchLastSection */ int QHeaderView::stretchSectionCount() const |