summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-07-20 15:34:08 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-07-21 15:44:23 +0000
commit5297289a3c4c180572da8d53e89235b9da8643af (patch)
treec249408941c7430475d21aae2e4c9df6cee523aa
parent13d256d114054292887c911312221e61719e2553 (diff)
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 Change-Id: Ifa44058f866e000ace75046a850906e170d04731 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> (cherry picked from commit 2af4532e3367d0704ea965c262cf2f2e22256a68) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/assistant/help/qhelpsearchengine.cpp8
-rw-r--r--src/assistant/help/qhelpsearchquerywidget.cpp2
2 files changed, 10 insertions, 0 deletions
diff --git a/src/assistant/help/qhelpsearchengine.cpp b/src/assistant/help/qhelpsearchengine.cpp
index 1053a9b6e..507fb2dbc 100644
--- a/src/assistant/help/qhelpsearchengine.cpp
+++ b/src/assistant/help/qhelpsearchengine.cpp
@@ -433,6 +433,7 @@ QHelpSearchResultWidget* QHelpSearchEngine::resultWidget()
return d->resultWidget;
}
+#if QT_DEPRECATED_SINCE(5, 9)
/*!
\deprecated
Use searchResultCount() instead.
@@ -451,6 +452,7 @@ int QHelpSearchEngine::hitCount() const
{
return d->searchResultCount();
}
+#endif // QT_DEPRECATED_SINCE(5, 9)
/*!
\since 5.9
@@ -461,6 +463,7 @@ int QHelpSearchEngine::searchResultCount() const
return d->searchResultCount();
}
+#if QT_DEPRECATED_SINCE(5, 9)
/*!
\typedef QHelpSearchEngine::SearchHit
\deprecated
@@ -484,6 +487,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
@@ -504,6 +508,7 @@ QString QHelpSearchEngine::searchInput() const
return d->m_searchInput;
}
+#if QT_DEPRECATED_SINCE(5, 9)
/*!
\deprecated
\since 4.5
@@ -514,6 +519,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.
@@ -561,6 +567,7 @@ void QHelpSearchEngine::search(const QString &searchInput)
d->search(searchInput);
}
+#if QT_DEPRECATED_SINCE(5, 9)
/*!
\deprecated
Use search(const QString &searchInput) instead.
@@ -572,6 +579,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 8367eb983..5c12ec0b7 100644
--- a/src/assistant/help/qhelpsearchquerywidget.cpp
+++ b/src/assistant/help/qhelpsearchquerywidget.cpp
@@ -294,6 +294,7 @@ void QHelpSearchQueryWidget::collapseExtendedSearch()
// TODO: no extended search anymore, deprecate it?
}
+#if QT_DEPRECATED_SINCE(5, 9)
/*!
\deprecated
@@ -317,6 +318,7 @@ void QHelpSearchQueryWidget::setQuery(const QList<QHelpSearchQuery> &queryList)
setSearchInput(queryList.first().wordList.join(QChar::Space));
}
+#endif // QT_DEPRECATED_SINCE(5, 9)
/*!
\since 5.9