refactor(registry): remove unused method from SearchQuery

This commit is contained in:
Oleg Shparber 2018-09-24 00:48:58 -04:00
parent 55d9947be5
commit cb2073f866
2 changed files with 1 additions and 13 deletions

View File

@ -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) {

View File

@ -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