| 146 | } |
| 147 | |
| 148 | Path::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 | |
| 192 | Path::List DefinesAndIncludesManager::frameworkDirectories( ProjectBaseItem* item, Type type ) const |
| 193 | { |
nothing calls this directly
no test coverage detected