| 64 | } |
| 65 | |
| 66 | QString RulesLoader::loadAllMarkdownFiles(const QString &dirPath) |
| 67 | { |
| 68 | QString combined; |
| 69 | QDir dir(dirPath); |
| 70 | |
| 71 | if (!dir.exists()) { |
| 72 | return QString(); |
| 73 | } |
| 74 | |
| 75 | QStringList mdFiles = dir.entryList({"*.md"}, QDir::Files, QDir::Name); |
| 76 | |
| 77 | for (const QString &fileName : mdFiles) { |
| 78 | QFile file(dir.filePath(fileName)); |
| 79 | if (file.open(QIODevice::ReadOnly | QIODevice::Text)) { |
| 80 | combined += file.readAll(); |
| 81 | combined += "\n\n"; |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | return combined; |
| 86 | } |
| 87 | |
| 88 | QString RulesLoader::getProjectPath(ProjectExplorer::Project *project) |
| 89 | { |