Changeset View
Changeset View
Standalone View
Standalone View
src/search/dolphinquery.cpp
Show All 26 Lines | |||||
27 | namespace { | 27 | namespace { | ||
28 | /** Checks if a given term in the Baloo::Query::searchString() is a special search term. | 28 | /** Checks if a given term in the Baloo::Query::searchString() is a special search term. | ||
29 | * This is a copy of `DolphinFacetsWidget::isRatingTerm()` method. | 29 | * This is a copy of `DolphinFacetsWidget::isRatingTerm()` method. | ||
30 | */ | 30 | */ | ||
31 | bool isSearchTerm(const QString& term) | 31 | bool isSearchTerm(const QString& term) | ||
32 | { | 32 | { | ||
33 | static const QLatin1String searchTokens[] { | 33 | static const QLatin1String searchTokens[] { | ||
34 | QLatin1String("modified>="), | 34 | QLatin1String("modified>="), | ||
35 | QLatin1String("rating>=") | 35 | QLatin1String("rating>="), | ||
36 | QLatin1String("tag:"), QLatin1String("tag=") | ||||
36 | }; | 37 | }; | ||
37 | 38 | | |||
38 | for (const auto &searchToken : searchTokens) { | 39 | for (const auto &searchToken : searchTokens) { | ||
39 | if (term.startsWith(searchToken)) { | 40 | if (term.startsWith(searchToken)) { | ||
40 | return true; | 41 | return true; | ||
41 | } | 42 | } | ||
42 | } | 43 | } | ||
43 | return false; | 44 | return false; | ||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |