QbsProjectManager: Correctly categorize cpp.systemIncludePaths

... for the code model.

Change-Id: Ibcbd8d42929373a765adb6bf2a9e9f7f730bdb57
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
Christian Kandeler
2019-07-09 14:45:27 +02:00
parent 46f7cd08ac
commit 61b4ef6bfa

View File

@@ -981,15 +981,19 @@ void QbsProject::updateCppCodeModel()
QLatin1String(CONFIG_DEFINES));
rpp.setMacros(Utils::transform<QVector>(list, [](const QString &s) { return ProjectExplorer::Macro::fromKeyValue(s); }));
list = props.getModulePropertiesAsStringList(QLatin1String(CONFIG_CPP_MODULE),
QLatin1String(CONFIG_INCLUDEPATHS));
list.append(props.getModulePropertiesAsStringList(QLatin1String(CONFIG_CPP_MODULE),
QLatin1String(CONFIG_SYSTEM_INCLUDEPATHS)));
list.removeDuplicates();
ProjectExplorer::HeaderPaths grpHeaderPaths;
foreach (const QString &p, list)
list = props.getModulePropertiesAsStringList(CONFIG_CPP_MODULE, CONFIG_INCLUDEPATHS);
list.removeDuplicates();
for (const QString &p : qAsConst(list))
grpHeaderPaths += {FilePath::fromUserInput(p).toString(), HeaderPathType::User};
list = props.getModulePropertiesAsStringList(CONFIG_CPP_MODULE,
CONFIG_SYSTEM_INCLUDEPATHS);
list.removeDuplicates();
for (const QString &p : qAsConst(list))
grpHeaderPaths += {FilePath::fromUserInput(p).toString(), HeaderPathType::System};
list = props.getModulePropertiesAsStringList(QLatin1String(CONFIG_CPP_MODULE),
QLatin1String(CONFIG_FRAMEWORKPATHS));
list.append(props.getModulePropertiesAsStringList(QLatin1String(CONFIG_CPP_MODULE),