| 99 | } |
| 100 | |
| 101 | bool matchesPath(const QString& path, const QString& typed) |
| 102 | { |
| 103 | int consumed = 0; |
| 104 | int pos = 0; |
| 105 | // try to find all the characters in typed in the right order in the path; |
| 106 | // jumps are allowed everywhere |
| 107 | while (consumed < typed.size() && pos < path.size()) { |
| 108 | if (typed.at(consumed).toLower() == path.at(pos).toLower()) { |
| 109 | consumed++; |
| 110 | } |
| 111 | pos++; |
| 112 | } |
| 113 | return consumed == typed.size(); |
| 114 | } |
| 115 | |
| 116 | bool matchesAbbreviationMulti(QStringView word, const QStringList& typedFragments) |
| 117 | { |
no test coverage detected