Changeset View
Changeset View
Standalone View
Standalone View
plugins/clang/duchain/clangindex.cpp
Show First 20 Lines • Show All 120 Lines • ▼ Show 20 Line(s) | 103 | if (top) { | |||
---|---|---|---|---|---|
121 | if (tuTop != top) { | 121 | if (tuTop != top) { | ||
122 | return tuTop->url(); | 122 | return tuTop->url(); | ||
123 | } | 123 | } | ||
124 | } | 124 | } | ||
125 | } | 125 | } | ||
126 | 126 | | |||
127 | // otherwise, fallback to a simple buddy search for headers | 127 | // otherwise, fallback to a simple buddy search for headers | ||
128 | if (ClangHelpers::isHeader(url.str())) { | 128 | if (ClangHelpers::isHeader(url.str())) { | ||
129 | foreach(const QUrl& buddy, DocumentFinderHelpers::getPotentialBuddies(url.toUrl(), false)) { | 129 | foreach(const QUrl& buddy, DocumentFinderHelpers::potentialBuddies(url.toUrl(), false)) { | ||
130 | const QString buddyPath = buddy.toLocalFile(); | 130 | const QString buddyPath = buddy.toLocalFile(); | ||
131 | if (QFile::exists(buddyPath)) { | 131 | if (QFile::exists(buddyPath)) { | ||
132 | return IndexedString(buddyPath); | 132 | return IndexedString(buddyPath); | ||
133 | } | 133 | } | ||
134 | } | 134 | } | ||
135 | } | 135 | } | ||
136 | return url; | 136 | return url; | ||
137 | } | 137 | } | ||
Show All 12 Lines |