Changeset View
Changeset View
Standalone View
Standalone View
languages/clang/duchain/parsesession.cpp
Show First 20 Lines • Show All 240 Lines • ▼ Show 20 Line(s) | 200 | #endif | |||
---|---|---|---|---|---|
241 | 241 | | |||
242 | if (hasQtIncludes(includes.system)) { | 242 | if (hasQtIncludes(includes.system)) { | ||
243 | const auto wrappedQtHeaders = QStandardPaths::locate(QStandardPaths::GenericDataLocation, | 243 | const auto wrappedQtHeaders = QStandardPaths::locate(QStandardPaths::GenericDataLocation, | ||
244 | QStringLiteral("kdevclangsupport/wrappedQtHeaders"), | 244 | QStringLiteral("kdevclangsupport/wrappedQtHeaders"), | ||
245 | QStandardPaths::LocateDirectory).toUtf8(); | 245 | QStandardPaths::LocateDirectory).toUtf8(); | ||
246 | if (!wrappedQtHeaders.isEmpty()) { | 246 | if (!wrappedQtHeaders.isEmpty()) { | ||
247 | smartArgs << wrappedQtHeaders; | 247 | smartArgs << wrappedQtHeaders; | ||
248 | clangArguments << "-isystem" << wrappedQtHeaders.constData(); | 248 | clangArguments << "-isystem" << wrappedQtHeaders.constData(); | ||
249 | const auto qtCore = wrappedQtHeaders + "/QtCore"; | 249 | const QByteArray qtCore = wrappedQtHeaders + "/QtCore"; | ||
250 | smartArgs << qtCore; | 250 | smartArgs << qtCore; | ||
251 | clangArguments << "-isystem" << qtCore.constData(); | 251 | clangArguments << "-isystem" << qtCore.constData(); | ||
252 | } | 252 | } | ||
253 | } | 253 | } | ||
254 | 254 | | |||
255 | addIncludes(&clangArguments, &smartArgs, includes.system, "-isystem"); | 255 | addIncludes(&clangArguments, &smartArgs, includes.system, "-isystem"); | ||
256 | addIncludes(&clangArguments, &smartArgs, includes.project, "-I"); | 256 | addIncludes(&clangArguments, &smartArgs, includes.project, "-I"); | ||
257 | 257 | | |||
Show All 40 Lines | 294 | if (code != CXError_Success) { | |||
298 | } | 298 | } | ||
299 | } | 299 | } | ||
300 | 300 | | |||
301 | if (m_unit) { | 301 | if (m_unit) { | ||
302 | setUnit(m_unit); | 302 | setUnit(m_unit); | ||
303 | m_environment = environment; | 303 | m_environment = environment; | ||
304 | 304 | | |||
305 | if (options.testFlag(PrecompiledHeader)) { | 305 | if (options.testFlag(PrecompiledHeader)) { | ||
306 | clang_saveTranslationUnit(m_unit, (tuUrl.byteArray() + ".pch").constData(), CXSaveTranslationUnit_None); | 306 | clang_saveTranslationUnit(m_unit, QByteArray(tuUrl.byteArray() + ".pch").constData(), CXSaveTranslationUnit_None); | ||
307 | } | 307 | } | ||
308 | } else { | 308 | } else { | ||
309 | qCWarning(KDEV_CLANG) << "Failed to parse translation unit:" << tuUrl; | 309 | qCWarning(KDEV_CLANG) << "Failed to parse translation unit:" << tuUrl; | ||
310 | } | 310 | } | ||
311 | } | 311 | } | ||
312 | 312 | | |||
313 | ParseSessionData::~ParseSessionData() | 313 | ParseSessionData::~ParseSessionData() | ||
314 | { | 314 | { | ||
▲ Show 20 Lines • Show All 178 Lines • Show Last 20 Lines |