- const QList<Baloo::Term> subTerms = term.subTerms();
- if (subTerms.isEmpty()) {
- // If term has no sub terms, then the term itself is either a "rating" term
- // or a "modified" term.
- return term.property() == QLatin1String("modified") ||
- term.property() == QLatin1String("rating");
-
- } else if (subTerms.size() == 2) {
- // If term has sub terms, then the sub terms are always "rating" and "modified" terms.
-
- QStringList properties;
- foreach (const Baloo::Term& subTerm, subTerms) {
- properties << subTerm.property();
- }
+ const QStringList subTerms = term.split(' ', QString::SkipEmptyParts);
+
+ // If term has sub terms, then sone of the sub terms are always "rating" and "modified" terms.
+ bool containsRating = false;
+ bool containsModified = false;