Exemple #1
0
int SearchEdit::queryStart() const
{
    Zeal::SearchQuery currentQuery = Zeal::SearchQuery::fromString(text());
    // Keep the filter for the first esc press
    if (currentQuery.keywordPrefixSize() > 0 && currentQuery.query().size() > 0)
        return currentQuery.keywordPrefixSize() + 1;
    else
        return 0;
}
Exemple #2
0
int SearchEdit::queryStart() const
{
    const Zeal::SearchQuery currentQuery = Zeal::SearchQuery::fromString(text());
    // Keep the filter for the first Escape press
    return currentQuery.query().isEmpty() ? 0 : currentQuery.keywordPrefixSize();
}