| 202 | } |
| 203 | |
| 204 | bool FileSearchUtils::matchesFilePattern(const QString &fileName, const QString &pattern) |
| 205 | { |
| 206 | if (pattern.isEmpty()) |
| 207 | return true; |
| 208 | |
| 209 | if (pattern.startsWith("*.")) { |
| 210 | QString extension = pattern.mid(1); |
| 211 | return fileName.endsWith(extension, Qt::CaseInsensitive); |
| 212 | } |
| 213 | |
| 214 | return fileName.compare(pattern, Qt::CaseInsensitive) == 0; |
| 215 | } |
| 216 | |
| 217 | QString FileSearchUtils::readFileContent(const QString &filePath) |
| 218 | { |