diff options
author | Ivan Solovev <ivan.solovev@qt.io> | 2022-07-20 15:34:08 +0200 |
---|---|---|
committer | Ivan Solovev <ivan.solovev@qt.io> | 2022-07-21 17:14:08 +0200 |
commit | 2af4532e3367d0704ea965c262cf2f2e22256a68 (patch) | |
tree | eb8e6cab96309142b31f23428cbf1fb0b67b719a /src/assistant | |
parent | ca8a71e1997650a0ecf497d667cfab5a72858c18 (diff) | |
download | qttools-2af4532e3367d0704ea965c262cf2f2e22256a68.tar.gz |
Assistant: guard deprecated method definitions
The definitions of the deprecated methods were not guarded by the
QT_DEPRECATED_SINCE() check, which causes compilation errors when trying
to get rid of the deprecated APIs using QT_DISABLE_DEPRECATED_BEFORE.
Task-number: QTBUG-104968
Pick-to: 6.4 6.3 6.2
Change-Id: Ifa44058f866e000ace75046a850906e170d04731
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Diffstat (limited to 'src/assistant')
-rw-r--r-- | src/assistant/help/qhelpsearchengine.cpp | 8 | ||||
-rw-r--r-- | src/assistant/help/qhelpsearchquerywidget.cpp | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/assistant/help/qhelpsearchengine.cpp b/src/assistant/help/qhelpsearchengine.cpp index ab89ff44a..9e7b3251a 100644 --- a/src/assistant/help/qhelpsearchengine.cpp +++ b/src/assistant/help/qhelpsearchengine.cpp @@ -397,6 +397,7 @@ QHelpSearchResultWidget* QHelpSearchEngine::resultWidget() return d->resultWidget; } +#if QT_DEPRECATED_SINCE(5, 9) /*! \deprecated Use searchResultCount() instead. @@ -415,6 +416,7 @@ int QHelpSearchEngine::hitCount() const { return d->searchResultCount(); } +#endif // QT_DEPRECATED_SINCE(5, 9) /*! \since 5.9 @@ -425,6 +427,7 @@ int QHelpSearchEngine::searchResultCount() const return d->searchResultCount(); } +#if QT_DEPRECATED_SINCE(5, 9) /*! \typedef QHelpSearchEngine::SearchHit \deprecated @@ -448,6 +451,7 @@ QList<QHelpSearchEngine::SearchHit> QHelpSearchEngine::hits(int start, int end) hits.append(qMakePair(result.url().toString(), result.title())); return hits; } +#endif // QT_DEPRECATED_SINCE(5, 9) /*! \since 5.9 @@ -468,6 +472,7 @@ QString QHelpSearchEngine::searchInput() const return d->m_searchInput; } +#if QT_DEPRECATED_SINCE(5, 9) /*! \deprecated \since 4.5 @@ -478,6 +483,7 @@ QList<QHelpSearchQuery> QHelpSearchEngine::query() const return QList<QHelpSearchQuery>() << QHelpSearchQuery(QHelpSearchQuery::DEFAULT, d->m_searchInput.split(QChar::Space)); } +#endif // QT_DEPRECATED_SINCE(5, 9) /*! Forces the search engine to reindex all documentation files. @@ -525,6 +531,7 @@ void QHelpSearchEngine::search(const QString &searchInput) d->search(searchInput); } +#if QT_DEPRECATED_SINCE(5, 9) /*! \deprecated Use search(const QString &searchInput) instead. @@ -536,6 +543,7 @@ void QHelpSearchEngine::search(const QList<QHelpSearchQuery> &queryList) d->search(queryList.first().wordList.join(QChar::Space)); } +#endif // QT_DEPRECATED_SINCE(5, 9) /*! \internal diff --git a/src/assistant/help/qhelpsearchquerywidget.cpp b/src/assistant/help/qhelpsearchquerywidget.cpp index 2e21f6733..1d3ba857f 100644 --- a/src/assistant/help/qhelpsearchquerywidget.cpp +++ b/src/assistant/help/qhelpsearchquerywidget.cpp @@ -258,6 +258,7 @@ void QHelpSearchQueryWidget::collapseExtendedSearch() // TODO: no extended search anymore, deprecate it? } +#if QT_DEPRECATED_SINCE(5, 9) /*! \deprecated @@ -281,6 +282,7 @@ void QHelpSearchQueryWidget::setQuery(const QList<QHelpSearchQuery> &queryList) setSearchInput(queryList.first().wordList.join(QChar::Space)); } +#endif // QT_DEPRECATED_SINCE(5, 9) /*! \since 5.9 |