| 248 | } |
| 249 | |
| 250 | QString sourceForHeader(const QString& headerPath) |
| 251 | { |
| 252 | if (!ClangHelpers::isHeader(headerPath)) { |
| 253 | return {}; |
| 254 | } |
| 255 | |
| 256 | QString targetUrl; |
| 257 | const auto buddies = DocumentFinderHelpers::potentialBuddies(QUrl::fromLocalFile(headerPath)); |
| 258 | for (const auto& buddy : buddies) { |
| 259 | const auto local = buddy.toLocalFile(); |
| 260 | if (QFileInfo::exists(local)) { |
| 261 | targetUrl = local; |
| 262 | break; |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | return targetUrl; |
| 267 | } |
| 268 | |
| 269 | } |
no test coverage detected