mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-23 14:26:12 +03:00
refactor(registry): remove unused method from SearchQuery
This commit is contained in:
parent
55d9947be5
commit
cb2073f866
@ -91,17 +91,6 @@ bool SearchQuery::hasKeywords() const
|
|||||||
return !m_keywords.isEmpty();
|
return !m_keywords.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SearchQuery::hasKeyword(const QString &keyword) const
|
|
||||||
{
|
|
||||||
// Temporary workaround for #333
|
|
||||||
// TODO: Remove once #167 is implemented
|
|
||||||
for (const QString &kw : m_keywords) {
|
|
||||||
if (keyword.startsWith(kw, Qt::CaseInsensitive))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SearchQuery::hasKeywords(const QStringList &keywords) const
|
bool SearchQuery::hasKeywords(const QStringList &keywords) const
|
||||||
{
|
{
|
||||||
for (const QString &keyword : keywords) {
|
for (const QString &keyword : keywords) {
|
||||||
|
@ -66,8 +66,7 @@ public:
|
|||||||
/// Returns true if there's a docset filter for the given query
|
/// Returns true if there's a docset filter for the given query
|
||||||
bool hasKeywords() const;
|
bool hasKeywords() const;
|
||||||
|
|
||||||
/// Returns true if the docset prefix match the ones given on query
|
/// Returns true if one the query contains one of the @c keywords.
|
||||||
bool hasKeyword(const QString &keyword) const;
|
|
||||||
bool hasKeywords(const QStringList &keywords) const;
|
bool hasKeywords(const QStringList &keywords) const;
|
||||||
|
|
||||||
/// Returns the docset filter raw size for the given query
|
/// Returns the docset filter raw size for the given query
|
||||||
|
Loading…
Reference in New Issue
Block a user