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

Method includes

plugins/custom-definesandincludes/definesandincludesmanager.cpp:148–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148Path::List DefinesAndIncludesManager::includes( ProjectBaseItem* item, Type type ) const
149{
150 Q_ASSERT(QThread::currentThread() == qApp->thread());
151
152 if (!item) {
153 return m_settings->provider()->includes(nullptr);
154 }
155
156 Path::List includes;
157
158 if (type & UserDefined) {
159 auto cfg = item->project()->projectConfiguration().data();
160
161 includes += KDevelop::toPathList(findConfigForItem(m_settings->readPaths(cfg), item).includes);
162 }
163
164 if ( type & ProjectSpecific ) {
165 auto buildManager = item->project()->buildSystemManager();
166 if ( buildManager ) {
167 includes += buildManager->includeDirectories(item);
168 }
169 }
170
171 for (auto provider : m_providers) {
172 if ( !(provider->type() & type) ) {
173 continue;
174 }
175 const auto newItems = provider->includes(item);
176 if ( provider->type() & DefinesAndIncludesManager::CompilerSpecific ) {
177 // If an item occurs in the "compiler specific" list, but was previously supplied
178 // in the user include path list already, remove it from there.
179 // Re-ordering the system include paths causes confusion in some cases.
180 for (const auto& x : newItems) {
181 includes.removeAll(x);
182 }
183 }
184 includes += newItems;
185 }
186
187 includes += NoProjectIncludePathsManager::includes(item->path().path());
188
189 return includes;
190}
191
192Path::List DefinesAndIncludesManager::frameworkDirectories( ProjectBaseItem* item, Type type ) const
193{

Callers

nothing calls this directly

Calls 12

toPathListFunction · 0.85
findConfigForItemFunction · 0.85
threadMethod · 0.80
readPathsMethod · 0.80
buildSystemManagerMethod · 0.80
providerMethod · 0.45
dataMethod · 0.45
projectConfigurationMethod · 0.45
projectMethod · 0.45
includeDirectoriesMethod · 0.45
typeMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected