MCPcopy Create free account
hub / github.com/KDE/kdevelop / sourceForHeader

Function sourceForHeader

plugins/clang/duchain/documentfinderhelpers.cpp:250–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250QString 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}

Callers 1

moveIntoSourceMethod · 0.85

Calls 2

potentialBuddiesFunction · 0.85
toLocalFileMethod · 0.80

Tested by

no test coverage detected